Skip to content

Commit dadeac9

Browse files
committed
Added --no-pep8 key for pytest
1 parent abd769d commit dadeac9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

conftest.py

+7
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,18 @@ def pytest_addoption(parser):
6363
choices=COLLECT_FILTERS, default='blacklist',
6464
help='filter tests during collection phase')
6565

66+
group.addoption('--no-pep8', action='store_true',
67+
help='skip PEP8 compliance tests')
68+
6669

6770
def pytest_configure(config):
6871
matplotlib._called_from_pytest = True
6972
matplotlib._init_tests()
7073

74+
if config.getoption('--no-pep8'):
75+
default_test_modules.remove('matplotlib.tests.test_coding_standards')
76+
IGNORED_TESTS['matplotlib'] += 'test_coding_standards'
77+
7178

7279
def pytest_unconfigure(config):
7380
matplotlib._called_from_pytest = False

0 commit comments

Comments
 (0)