Commit aee47561 authored by Antoine Pitrou's avatar Antoine Pitrou

Relax test condition (fix failures on FreeBSD buildbots)

parent 37ade9cb
......@@ -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).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment