From 371a35c94370066b5f9598b195a828c9a7ce1d04 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 14 Jun 2010 00:06:34 -0400 Subject: [PATCH] Update a FileUtils test so that it doesn't depend on the ordering of a list. --- src/Tests/Unit/FileUtilsTest.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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): -- 2.43.2