From: Antoine Pitrou Date: Thu, 16 Sep 2010 15:04:49 +0000 (+0000) Subject: Relax test condition (fix failures on FreeBSD buildbots) X-Git-Tag: v3.2a3~244 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aee47561fc888bd1554ee80fe0db4f3ca831aa7f;p=thirdparty%2FPython%2Fcpython.git Relax test condition (fix failures on FreeBSD buildbots) --- diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py index 1ba5a23c86ca..6c8907d4fafd 100644 --- a/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py @@ -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"[, ]", stderr) + self.assertNotIn(b"", 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"[, ]", stderr) + self.assertTrue( + (b"[, ]" in stderr) or + (b"[, ]" 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).