Skip to content

Commit 88d5262

Browse files
committed
Use subprocess instead of os.system in testall.py
1 parent 52b2187 commit 88d5262

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/testall.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
#
33
# Run the test suite against all the Python versions we can find.
44
#
5-
6-
7-
8-
import sys
95
import os
10-
from os.path import dirname, abspath, join
116
import re
12-
7+
import subprocess
8+
import sys
9+
from os.path import abspath, dirname, join
1310

1411
TOP = dirname(dirname(abspath(__file__)))
1512
sys.path.insert(0, join(TOP, "tools"))
@@ -50,7 +47,11 @@ def testall():
5047
ver_str = "%s.%s" % ver
5148
print("-- test with Python %s (%s)" % (ver_str, python))
5249
assert ' ' not in python
53-
rv = os.system("MACOSX_DEPLOYMENT_TARGET= %s test.py -- -knownfailure" % python)
50+
proc = subprocess.Popen(
51+
"MACOSX_DEPLOYMENT_TARGET= %s test.py -- -knownfailure" % python,
52+
shell=True
53+
)
54+
rv = proc.wait()
5455
if rv:
5556
sys.exit(os.WEXITSTATUS(rv))
5657

0 commit comments

Comments
 (0)