summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_interpreters/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_interpreters/utils.py')
-rw-r--r--Lib/test/test_interpreters/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_interpreters/utils.py b/Lib/test/test_interpreters/utils.py
index 623c873..11b6f12 100644
--- a/Lib/test/test_interpreters/utils.py
+++ b/Lib/test/test_interpreters/utils.py
@@ -29,10 +29,12 @@ def clean_up_interpreters():
pass # already destroyed
-def _run_output(interp, request, channels=None):
+def _run_output(interp, request, init=None):
script, rpipe = _captured_script(request)
with rpipe:
- interp.exec_sync(script, channels=channels)
+ if init:
+ interp.prepare_main(init)
+ interp.exec_sync(script)
return rpipe.read()