mirror of
https://github.com/python/cpython.git
synced 2025-08-14 13:59:20 +00:00
[3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005). (GH-28028)
(cherry picked from commit 2a8127cafe
)
This commit is contained in:
parent
dab74d68e3
commit
330aabbbbe
36 changed files with 143 additions and 15 deletions
|
@ -3,6 +3,7 @@ import types
|
|||
import unittest
|
||||
|
||||
from test.support import import_module
|
||||
from test.support import gc_collect
|
||||
asyncio = import_module("asyncio")
|
||||
|
||||
|
||||
|
@ -659,6 +660,7 @@ class AsyncGenAsyncioTest(unittest.TestCase):
|
|||
await g.__anext__()
|
||||
await g.__anext__()
|
||||
del g
|
||||
gc_collect() # For PyPy or other GCs.
|
||||
|
||||
await asyncio.sleep(0.1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue