Make nose run tests in parallel

This commit is contained in:
wiredfool 2014-06-25 15:01:47 -07:00
parent 1056bd781a
commit 24cd3d2cfa
2 changed files with 9 additions and 1 deletions

View File

@ -3,7 +3,7 @@ language: python
notifications:
irc: "chat.freenode.net#pil"
env: MAX_CONCURRENCY=4
env: MAX_CONCURRENCY=4 NOSE_PROCESSES=4 NOSE_PROCESS_TIMEOUT=30
python:
- "pypy"

View File

@ -20,5 +20,13 @@ if len(sys.argv) == 1:
if ('--no-path-adjustment' not in sys.argv) and ('-P' not in sys.argv):
sys.argv.insert(1, '--no-path-adjustment')
if 'NOSE_PROCESSES' not in os.environ:
for arg in sys.argv:
if '--processes' in arg:
break
else: # for
sys.argv.insert(1, '--processes=-1') # -1 == number of cores
sys.argv.insert(1, '--process-timeout=30')
if __name__ == '__main__':
nose.main()