Skip to content

Commit

Permalink
use subprocess in test runner
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.mystic.cacr.caltech.edu/pathos/dill@1267 8bfda07e-5b16-0410-ab1d-fd04ec2748df
  • Loading branch information
mmckerns committed Oct 26, 2019
1 parent 7b255cb commit a33903f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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('')

0 comments on commit a33903f

Please sign in to comment.