]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
process_test: Use isolated mode for subprocess tests
authorBen Darnell <ben@bendarnell.com>
Tue, 9 Dec 2025 17:10:18 +0000 (12:10 -0500)
committerBen Darnell <ben@bendarnell.com>
Tue, 9 Dec 2025 17:10:18 +0000 (12:10 -0500)
Prompt customizations (notably the PYTHONSTARTUP file used by
vscode's terminal integration) can interfere with tests that run
interactive interpreters in a subprocess. Run those interpreters
in isolated mode to avoid this problem.)

tornado/test/process_test.py

index 0fdb941850c3824301307a13bda148c90540e418..1c5cff326a8271cfd481447c9ca79500302f292d 100644 (file)
@@ -141,7 +141,7 @@ class SubprocessTest(AsyncTestCase):
     @gen_test
     def test_subprocess(self):
         subproc = Subprocess(
-            [sys.executable, "-u", "-i"],
+            [sys.executable, "-u", "-i", "-I"],
             stdin=Subprocess.STREAM,
             stdout=Subprocess.STREAM,
             stderr=subprocess.STDOUT,
@@ -163,7 +163,7 @@ class SubprocessTest(AsyncTestCase):
     def test_close_stdin(self):
         # Close the parent's stdin handle and see that the child recognizes it.
         subproc = Subprocess(
-            [sys.executable, "-u", "-i"],
+            [sys.executable, "-u", "-i", "-I"],
             stdin=Subprocess.STREAM,
             stdout=Subprocess.STREAM,
             stderr=subprocess.STDOUT,