mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Test with multiprocessing
This commit is contained in:
parent
b609ee5cbd
commit
96df8a8fda
|
@ -14,19 +14,18 @@ sys.path.insert(0, os.path.abspath('./Tests'))
|
||||||
# Something is required, because if we import the tests from the local
|
# Something is required, because if we import the tests from the local
|
||||||
# directory, once again, we've got the non-installed PIL in the way
|
# directory, once again, we've got the non-installed PIL in the way
|
||||||
for i, arg in enumerate(sys.argv[1:]):
|
for i, arg in enumerate(sys.argv[1:]):
|
||||||
print(i, arg)
|
|
||||||
if arg.startswith('Tests/test_') and arg.endswith('.py'):
|
if arg.startswith('Tests/test_') and arg.endswith('.py'):
|
||||||
print("bingo")
|
|
||||||
sys.argv.insert(i+1, '-k')
|
sys.argv.insert(i+1, '-k')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
sys.argv.append('Tests')
|
sys.argv.append('Tests')
|
||||||
|
|
||||||
# for arg in sys.argv:
|
for arg in sys.argv:
|
||||||
# if '-n' in arg or '--numprocesses' in arg:
|
if '-n' in arg or '--numprocesses' in arg:
|
||||||
# break
|
break
|
||||||
# else: # for
|
else: # for
|
||||||
# sys.argv.extend(['--numprocesses' ,'auto']) # auto-detect number of CPUs
|
sys.argv.extend(['--numprocesses', 'auto']) # auto-detect number of CPUs
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
pytest.main()
|
pytest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user