Skip to content

Commit 7ea39c4

Browse files
s-t-e-v-e-n-kionelmc
authored andcommitted
Use sys.executable everywhere in test_remote
Not all systems use python to run the interpreter, and this also doesn't help if the user has multiple interpreters in their path. Use sys.executable like the other test case in this file.
1 parent d9f11cd commit 7ea39c4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_remote.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@pytest.mark.skipif('platform.system() == "Windows"')
1717
def test_manhole():
18-
with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
18+
with TestProcess(sys.executable, '-msamplemanhole') as target, dump_on_error(target.read):
1919
wait_for_strings(target.read, TIMEOUT, 'Oneshot activation is done by signal')
2020

2121
with TestProcess('hunter-trace', '-p', str(target.proc.pid), 'stdlib=False') as tracer, dump_on_error(tracer.read):
@@ -32,7 +32,7 @@ def test_manhole():
3232

3333
@pytest.mark.skipif('platform.system() == "Windows"')
3434
def test_manhole_reattach():
35-
with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
35+
with TestProcess(sys.executable, '-msamplemanhole') as target, dump_on_error(target.read):
3636
wait_for_strings(target.read, TIMEOUT, 'Oneshot activation is done by signal')
3737

3838
with TestProcess('hunter-trace', '-p', str(target.proc.pid), 'stdlib=False') as tracer, dump_on_error(tracer.read):
@@ -61,7 +61,7 @@ def test_manhole_reattach():
6161

6262
@pytest.mark.skipif('platform.system() == "Windows"')
6363
def test_manhole_clean_exit():
64-
with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
64+
with TestProcess(sys.executable, '-msamplemanhole') as target, dump_on_error(target.read):
6565
wait_for_strings(target.read, TIMEOUT, 'Oneshot activation is done by signal')
6666

6767
with TestProcess('hunter-trace', '-p', str(target.proc.pid), 'stdlib=False') as tracer, dump_on_error(tracer.read):
@@ -90,7 +90,7 @@ def test_manhole_clean_exit():
9090
@pytest.mark.skipif('platform.python_implementation() == "PyPy"')
9191
@pytest.mark.skipif('not which("gdb")')
9292
def test_gdb():
93-
with TestProcess('python', '-msamplemanhole') as target, dump_on_error(target.read):
93+
with TestProcess(sys.executable, '-msamplemanhole') as target, dump_on_error(target.read):
9494
with TestProcess('hunter-trace', '-p', str(target.proc.pid), '--gdb', 'stdlib=False') as tracer, dump_on_error(tracer.read):
9595
wait_for_strings(
9696
tracer.read,

0 commit comments

Comments
 (0)