summaryrefslogtreecommitdiffstats
path: root/Lib/test/test__xxsubinterpreters.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test__xxsubinterpreters.py')
-rw-r--r--Lib/test/test__xxsubinterpreters.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test__xxsubinterpreters.py b/Lib/test/test__xxsubinterpreters.py
index 80eff19..e17bfde 100644
--- a/Lib/test/test__xxsubinterpreters.py
+++ b/Lib/test/test__xxsubinterpreters.py
@@ -794,6 +794,7 @@ class RunStringTests(TestBase):
self.assertEqual(out, 'it worked!')
def test_create_thread(self):
+ subinterp = interpreters.create(isolated=False)
script, file = _captured_script("""
import threading
def f():
@@ -804,7 +805,7 @@ class RunStringTests(TestBase):
t.join()
""")
with file:
- interpreters.run_string(self.id, script)
+ interpreters.run_string(subinterp, script)
out = file.read()
self.assertEqual(out, 'it worked!')