8000 Added `-j` shortcut for `--processes=` · matplotlib/matplotlib@ca8dcee · GitHub
[go: up one dir, main page]

Skip to content

Commit ca8dcee

Browse files
committed
Added -j shortcut for --processes=
1 parent ba019f7 commit ca8dcee

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ env:
4444
- PANDAS=
4545
- NPROC=2
4646
- TEST_ARGS=--no-pep8
47-
- NOSE_ARGS="--processes=$NPROC --process-timeout=300"
47+
- NOSE_ARGS="-j $NPROC"
4848
- PYTEST_ARGS="-ra --timeout=300 --durations=25 --cov-report= --cov=lib" # -n $NPROC
4949
- PYTHON_ARGS=
5050
- DELETE_FONT_CACHE=

tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
disable_internet.turn_off_internet()
2929
extra_args.extend(['-a', '!network'])
3030
sys.argv.remove('--no-network')
31+
if '-j' in sys.argv:
32+
nproc = sys.argv[sys.argv.index('-j') + 1]
33+
extra_args.extend([
34+
'--processes={}'.format(int(nproc)),
35+
'--process-timeout=300'
36+
])
37+
sys.argv.remove('-j')
38+
sys.argv.remove(nproc)
3139

3240
print('Python byte-compilation optimization level: %d' % sys.flags.optimize)
3341

0 commit comments

Comments
 (0)
0