From a33903faa18bb88ebb1d42504d55dcce4027f39a Mon Sep 17 00:00:00 2001 From: mmckerns Date: Sat, 26 Oct 2019 15:01:46 +0000 Subject: [PATCH] use subprocess in test runner git-svn-id: svn+ssh://svn.mystic.cacr.caltech.edu/pathos/dill@1267 8bfda07e-5b16-0410-ab1d-fd04ec2748df --- tests/__main__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/__main__.py b/tests/__main__.py index d392dac9..3f04fa33 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -13,6 +13,9 @@ python = pox.which_python(version=True, fullpath=False) or 'python' except ImportError: python = 'python' +import subprocess as sp +from sys import platform +shell = platform[:3] == 'win' suite = os.path.dirname(__file__) or os.path.curdir tests = glob.glob(suite + os.path.sep + 'test_*.py') @@ -21,7 +24,8 @@ if __name__ == '__main__': for test in tests: - print('.', end='') - os.system('{0} {1}'.format(python, test)) + p = sp.Popen([python, test], shell=shell).wait() + if not p: + print('.', end='') print('')