Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.6 Changeset: r97399:831c8760bfbd Date: 2019-09-07 14:06 +0200 http://bitbucket.org/pypy/pypy/changeset/831c8760bfbd/
Log: tests should gc.collect before checking weakrefs diff --git a/lib-python/3/test/test_concurrent_futures.py b/lib-python/3/test/test_concurrent_futures.py --- a/lib-python/3/test/test_concurrent_futures.py +++ b/lib-python/3/test/test_concurrent_futures.py @@ -428,6 +428,7 @@ futures_list.remove(future) wr = weakref.ref(future) del future + test.support.gc_collect() self.assertIsNone(wr()) futures_list[0].set_result("test") @@ -435,6 +436,7 @@ futures_list.remove(future) wr = weakref.ref(future) del future + test.support.gc_collect() self.assertIsNone(wr()) if futures_list: futures_list[0].set_result("test") @@ -533,6 +535,7 @@ for obj in self.executor.map(make_dummy_object, range(10)): wr = weakref.ref(obj) del obj + test.support.gc_collect() self.assertIsNone(wr()) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit