Skip to content

Commit 04b78fa

Browse files
committed
runtests: fix subprocess call to run tests
Make sure the correct Python interpreter is used.
1 parent ccbd01e commit 04b78fa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

runtests.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import subprocess
99
import sys
1010
import tempfile
11+
import textwrap
1112

1213
from pkg_resources import load_entry_point
1314

@@ -46,7 +47,15 @@ def tests_run(display, authfile=None):
4647
os.environ['DISPLAY'] = display
4748
os.environ['XAUTHORITY'] = authfile
4849
cmd = [
49-
'nosetests',
50+
sys.executable,
51+
'-c', textwrap.dedent(
52+
'''
53+
from pkg_resources import load_entry_point
54+
sys.exit(load_entry_point(
55+
'nose', 'console_scripts', 'nosetests',
56+
)())
57+
'''
58+
).lstrip(),
5059
'--exe', '--with-xunit', '--verbosity=3',
5160
]
5261
has_custom_tests = False

0 commit comments

Comments
 (0)