]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Update a FileUtils test so that it doesn't depend on the ordering of a list.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 14 Jun 2010 04:06:34 +0000 (00:06 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 14 Jun 2010 04:06:34 +0000 (00:06 -0400)
src/Tests/Unit/FileUtilsTest.py

index e649c4f78f5288d41430afafd20b0b7bb56daa04..21e5182ae8491da7c05760eef42fa7f4758740e0 100644 (file)
@@ -43,11 +43,9 @@ class FindFilePathsTest(unittest.TestCase):
         
         res = FileUtils.find_file_paths(fixtures_path, target_files)
         self.assertTrue(len(res) == 2)
-        # "gentoo" comes first alphabetically, and so we'll traverse
-        # it first. Thus, postgis.sql should be found before
-        # lwpostgis.sql.
-        self.assertTrue('postgis.sql' in res[0])
-        self.assertTrue('lwpostgis.sql' in res[1])
+        # The order of these two is not reliable.
+        self.assertTrue('postgis.sql' in res[0] or 'postgis.sql' in res[1])
+        self.assertTrue('lwpostgis.sql' in res[0] or 'lwpostgis.sql' in res[1])
 
 
     def testOnlyOneResultReturnedWhenReturnFirstTrue(self):