# HG changeset patch # User Bryan O'Sullivan # Date 1450916540 28800 # Node ID 23541bdd1610c08af247f9c8719045cf247ce541 # Parent 50ad3f25fb4c39de2cb0c61583602d4c33b0a367 test-bundle2-format: force gc so a GeneratorExit will be thrown PyPy has looser semantics than CPython for when a generator's close method will be called. Forcing the gc causes it to be called at the right moment. diff -r 50ad3f25fb4c -r 23541bdd1610 tests/test-bundle2-format.t --- a/tests/test-bundle2-format.t Wed Dec 23 16:22:20 2015 -0800 +++ b/tests/test-bundle2-format.t Wed Dec 23 16:22:20 2015 -0800 @@ -13,7 +13,7 @@ > code. We still need to be able to test it while it grow up. > """ > - > import sys, os + > import sys, os, gc > from mercurial import cmdutil > from mercurial import util > from mercurial import bundle2 @@ -158,6 +158,7 @@ > # too zealous. It's important for this test that the break > # occur while we're in the middle of a part. > break + > gc.collect() > ui.write('fake timeout complete.\n') > return > try: