mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
gh-76785: Consolidate Some Interpreter-related Testing Helpers (gh-117485)
This eliminates the duplication of functionally identical helpers in the _testinternalcapi and _xxsubinterpreters modules.
This commit is contained in:
parent
f341d6017d
commit
857d3151c9
10 changed files with 527 additions and 313 deletions
|
@ -584,7 +584,7 @@ class RunStringTests(TestBase):
|
|||
def test_create_daemon_thread(self):
|
||||
with self.subTest('isolated'):
|
||||
expected = 'spam spam spam spam spam'
|
||||
subinterp = interpreters.create(isolated=True)
|
||||
subinterp = interpreters.create('isolated')
|
||||
script, file = _captured_script(f"""
|
||||
import threading
|
||||
def f():
|
||||
|
@ -604,7 +604,7 @@ class RunStringTests(TestBase):
|
|||
self.assertEqual(out, expected)
|
||||
|
||||
with self.subTest('not isolated'):
|
||||
subinterp = interpreters.create(isolated=False)
|
||||
subinterp = interpreters.create('legacy')
|
||||
script, file = _captured_script("""
|
||||
import threading
|
||||
def f():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue