From: Michael Orlitzky Date: Mon, 14 Jun 2010 04:06:34 +0000 (-0400) Subject: Update a FileUtils test so that it doesn't depend on the ordering of a list. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=371a35c94370066b5f9598b195a828c9a7ce1d04;p=dead%2Fcensus-tools.git Update a FileUtils test so that it doesn't depend on the ordering of a list. --- diff --git a/src/Tests/Unit/FileUtilsTest.py b/src/Tests/Unit/FileUtilsTest.py index e649c4f..21e5182 100644 --- a/src/Tests/Unit/FileUtilsTest.py +++ b/src/Tests/Unit/FileUtilsTest.py @@ -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):