summary refs log tree commit diff stats
path: root/test/tc_directory.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-13 19:42:51 +0100
committerhut <hut@lavabit.com>2009-12-13 19:42:51 +0100
commit1159f9ec182496ddc5324f23fb1d5eae73fe63e3 (patch)
tree02a79bdd232b7aa5f49e7ee9ec713141a4118358 /test/tc_directory.py
parent4c05e43d11430fbfd8a5d86ae0070e24775251b1 (diff)
downloadranger-1159f9ec182496ddc5324f23fb1d5eae73fe63e3.tar.gz
updated / added tests
Diffstat (limited to 'test/tc_directory.py')
-rw-r--r--test/tc_directory.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tc_directory.py b/test/tc_directory.py
index 676ec0fe..11c94b3b 100644
--- a/test/tc_directory.py
+++ b/test/tc_directory.py
@@ -48,11 +48,11 @@ class Test1(unittest.TestCase):
 		for name in assumed_filenames:
 			f = File(name)
 			f.load()
-			equal = 0
 			for dirfile in dir.files:
-				if (f.__dict__ == dirfile.__dict__):
-					equal += 1
-			self.assertEqual(equal, 1)
+				if (f.path == dirfile.path and f.stat == dirfile.stat):
+					break
+			else:
+				self.fail("couldn't find file {0}".format(name))
 
 	def test_nonexistant_dir(self):
 		dir = Directory(NONEXISTANT_DIR)