Mercurial > hg-stable
changeset 27539:23541bdd1610
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.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Wed, 23 Dec 2015 16:22:20 -0800 |
parents | 50ad3f25fb4c |
children | 9dcd55a63f0b |
files | tests/test-bundle2-format.t |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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: