From fe179145892d5835b33c79ab90b6ba257cf5f12d Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 23 Nov 2009 22:28:13 +0100 Subject: test cases for directory.py --- test/tc_directory.py | 67 ++++++++++++++++++++++++++++++++++++++++++++++ test/testdir/largefile.txt | 1 + test/testdir/zerobytes | 0 3 files changed, 68 insertions(+) create mode 100644 test/tc_directory.py create mode 100644 test/testdir/largefile.txt create mode 100644 test/testdir/zerobytes (limited to 'test') diff --git a/test/tc_directory.py b/test/tc_directory.py new file mode 100644 index 00000000..b0a4b780 --- /dev/null +++ b/test/tc_directory.py @@ -0,0 +1,67 @@ +import unittest +import sys, os +sys.path.append('../code') +import directory + +TESTDIR = os.path.realpath(os.path.join(os.path.dirname(sys.argv[0]), 'testdir')) +NONEXISTANT_DIR = '/this/directory/will/most/certainly/not/exist' + +class Test1(unittest.TestCase): + def testInitialCondition(self): + # Check for the expected initial condition + dir = directory.Directory(TESTDIR) + + self.assertEqual(dir.path, TESTDIR) + self.assertFalse(dir.files_loaded) + self.assertEqual(dir.files, None) + self.assertRaises(directory.NotLoadedYet, len, dir) + self.assertRaises(directory.NotLoadedYet, dir.__getitem__, 0) + + def testAfterFilesLoaded(self): + # Check whether the directory has the correct list of files. + dir = directory.Directory(TESTDIR) + dir.load_files() + + self.assertTrue(dir.exists) + self.assertEqual(type(dir.files), list) + + # Get the files you expect it to have and sort both before + # comparing. I don't expect any order after only loading the files. + assumed_files = os.listdir(TESTDIR) + assumed_files.sort() + dir.files.sort() + + self.assertTrue(len(dir) > 0) + self.assertEqual(dir.files, assumed_files) + + def testNonexistantDir(self): + dir = directory.Directory(NONEXISTANT_DIR) + dir.load_files() + + self.assertTrue(dir.files_loaded) + self.assertFalse(dir.exists) + self.assertFalse(dir.accessible) + self.assertEqual(dir.files, None) + self.assertRaises(directory.NotLoadedYet, len, dir) + self.assertRaises(directory.NotLoadedYet, dir.__getitem__, 0) + + def testModifyFrozenClone(self): + dir = directory.Directory(TESTDIR) + clone = dir.frozenClone() + + # assert that their attributes are equal, except for frozen, which + # should be true for the clone. + self.assertTrue(clone.frozen) + clone.frozen = False + self.assertEqual(dir.__dict__, clone.__dict__) + clone.frozen = True + + # check for inequality after loading files with one object + self.assertEqual(dir.files, clone.files) + dir.load_files() + self.assertNotEqual(dir.files, clone.files) + + self.assertRaises(directory.FrozenException, clone.load_files) + +unittest.main() + diff --git a/test/testdir/largefile.txt b/test/testdir/largefile.txt new file mode 100644 index 00000000..0eb8c64f --- /dev/null +++ b/test/testdir/largefile.txt @@ -0,0 +1 @@ +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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