]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Relax test condition (fix failures on FreeBSD buildbots)
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 16 Sep 2010 15:04:49 +0000 (15:04 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 16 Sep 2010 15:04:49 +0000 (15:04 +0000)
Lib/test/test_gc.py

index 1ba5a23c86ca4fc8e3a14efd331600ce1e2c5d42..6c8907d4fafdbbc18080c21c95cca708b7b40747 100644 (file)
@@ -495,11 +495,13 @@ class GCTests(unittest.TestCase):
 
         stderr = run_command(code % "0")
         self.assertIn(b"gc: 2 uncollectable objects at shutdown", stderr)
-        self.assertNotIn(b"[<X 'first'>, <X 'second'>]", stderr)
+        self.assertNotIn(b"<X 'first'>", stderr)
         # With DEBUG_UNCOLLECTABLE, the garbage list gets printed
         stderr = run_command(code % "gc.DEBUG_UNCOLLECTABLE")
         self.assertIn(b"gc: 2 uncollectable objects at shutdown", stderr)
-        self.assertIn(b"[<X 'first'>, <X 'second'>]", stderr)
+        self.assertTrue(
+            (b"[<X 'first'>, <X 'second'>]" in stderr) or
+            (b"[<X 'second'>, <X 'first'>]" in stderr), stderr)
         # With DEBUG_SAVEALL, no additional message should get printed
         # (because gc.garbage also contains normally reclaimable cyclic
         # references, and its elements get printed at runtime anyway).