Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76694a7

Browse files
committed
Merge pull request matplotlib#3236 from mdboom/pep8-tests-in-separate-config
Test PEP8 stuff in separate Travis build.
2 parents 956db9f + 7ca85ef commit 76694a7

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

.travis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ env:
55
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
66
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
77

8+
matrix:
9+
- TEST_ARGS=--no-pep8
10+
811
before_script:
912
- gem install travis-artifacts
1013

@@ -16,6 +19,11 @@ python:
1619
- 3.3
1720
- 3.4
1821

22+
matrix:
23+
include:
24+
- python: 2.7
25+
env: TEST_ARGS=--pep8
26+
1927
install:
2028
- pip install -q --use-mirrors nose python-dateutil numpy pep8 pyparsing pillow
2129
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools
@@ -31,7 +39,7 @@ script:
3139
# Generate the font caches in a single process before starting the
3240
# multiple processes
3341
- python -c "from matplotlib import font_manager"
34-
- python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300
42+
- python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS
3543

3644
after_failure:
3745
- tar cjf result_images.tar.bz2 result_images

lib/matplotlib/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,9 +1384,10 @@ def test(verbosity=1):
13841384
# a list.
13851385
multiprocess._instantiate_plugins = [KnownFailure]
13861386

1387-
success = nose.run( defaultTest=default_test_modules,
1388-
config=config,
1389-
)
1387+
success = nose.run(
1388+
defaultTest=default_test_modules,
1389+
config=config,
1390+
)
13901391
finally:
13911392
if old_backend.lower() != 'agg':
13921393
use(old_backend)

tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# these options.
1111

1212
import os
13+
import sys
1314
import time
1415

1516
import matplotlib
@@ -39,4 +40,11 @@ def run():
3940
defaultTest=default_test_modules)
4041

4142
if __name__ == '__main__':
43+
if '--no-pep8' in sys.argv:
44+
default_test_modules.remove('matplotlib.tests.test_coding_standards')
45+
sys.argv.remove('--no-pep8')
46+
elif '--pep8' in sys.argv:
47+
default_test_modules = ['matplotlib.tests.test_coding_standards']
48+
sys.argv.remove('--pep8')
49+
4250
run()

0 commit comments

Comments
 (0)