Skip to content

Commit bfb7d5d

Browse files
add a test
1 parent d544001 commit bfb7d5d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Lib/test/test_gc.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,19 @@ def test_ast_fini(self):
15801580
""")
15811581
assert_python_ok("-c", code)
15821582

1583+
def test_warnings_fini(self):
1584+
# See https://github.com/python/cpython/issues/137384
1585+
code = textwrap.dedent('''
1586+
import asyncio
1587+
from contextvars import ContextVar
1588+
1589+
context_loop = ContextVar("context_loop", default=None)
1590+
loop = asyncio.new_event_loop()
1591+
context_loop.set(loop)
1592+
''')
1593+
1594+
assert_python_ok("-c", code)
1595+
15831596

15841597
def setUpModule():
15851598
global enabled, debug

0 commit comments

Comments
 (0)