Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Lib/test/test_interpreters/test_channels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import importlib
import pickle
import threading
from textwrap import dedent
Expand Down Expand Up @@ -28,7 +27,12 @@ class LowLevelTests(TestBase):

def test_highlevel_reloaded(self):
# See gh-115490 (https://github.com/python/cpython/issues/115490).
importlib.reload(channels)
interp = interpreters.create()
interp.exec(dedent(f"""
import importlib
from test.support import channels
importlib.reload(channels)
"""));


class TestChannels(TestBase):
Expand Down
8 changes: 6 additions & 2 deletions Lib/test/test_interpreters/test_queues.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import importlib
import pickle
import threading
from textwrap import dedent
Expand Down Expand Up @@ -39,7 +38,12 @@ class LowLevelTests(TestBase):

def test_highlevel_reloaded(self):
# See gh-115490 (https://github.com/python/cpython/issues/115490).
importlib.reload(queues)
interp = interpreters.create()
interp.exec(dedent(f"""
import importlib
from concurrent.interpreters import _queues as queues
importlib.reload(queues)
"""));

def test_create_destroy(self):
qid = _queues.create(2, REPLACE, -1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Isolate reloading modules in test_interpreters to avoid having broken
references.
Loading