diff options
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index 1890a753..042b389c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -226,10 +226,21 @@ def test_stdsim_line_buffering(base_app): @pytest.fixture def pr_none(): import subprocess - command = 'ls' + + # Put the new process into a separate group so signals sent to it won't interfere with this process if sys.platform.startswith('win'): command = 'dir' - proc = subprocess.Popen([command], shell=True) + creationflags = subprocess.CREATE_NEW_PROCESS_GROUP + start_new_session = False + else: + command = 'ls' + creationflags = 0 + start_new_session = True + + proc = subprocess.Popen([command], + creationflags=creationflags, + start_new_session=start_new_session, + shell=True) pr = cu.ProcReader(proc, None, None) return pr |