mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Switch test_autokill back to subprocess.Popen - os.spawn uses fork internally, even on Python 3.
This commit is contained in:
parent
c9c6417788
commit
9bedbedd4e
1 changed files with 6 additions and 1 deletions
|
|
@ -198,6 +198,8 @@ def test_subprocess(debug_session, pyfile):
|
|||
|
||||
|
||||
@pytest.mark.timeout(60)
|
||||
@pytest.mark.skipif(sys.version_info < (3, 0) and (platform.system() != 'Windows'),
|
||||
reason='Bug #935')
|
||||
def test_autokill(debug_session, pyfile):
|
||||
@pyfile
|
||||
def child():
|
||||
|
|
@ -208,8 +210,11 @@ def test_autokill(debug_session, pyfile):
|
|||
def parent():
|
||||
import backchannel
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
os.spawnl(os.P_NOWAIT, sys.executable, sys.executable, sys.argv[1])
|
||||
argv = [sys.executable, sys.argv[1]]
|
||||
env = os.environ.copy()
|
||||
subprocess.Popen(argv, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
backchannel.read_json()
|
||||
|
||||
debug_session.multiprocess = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue