File tree Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Expand file tree Collapse file tree 5 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ branches:
66 - /^v\d\.\d+\.\d+(rc\d+|\.dev\d+)?$/
77matrix :
88 include :
9+ - python : 3.8
10+ env : TOXENV=flake8
911 - python : 2.7
1012 env : TOXENV=py27
1113 - python : pypy
Original file line number Diff line number Diff line change 1+ def pytest_collection_modifyitems (session , config , items ):
2+ # Avoid executing tests when executing `--flake8` flag (pytest-flake8)
3+ try :
4+ from pytest_flake8 import Flake8Item
5+ if config .getoption ('--flake8' ):
6+ items [:] = [item for item in items if isinstance (item , Flake8Item )]
7+ except ImportError :
8+ pass
Original file line number Diff line number Diff line change 4141# Add any Sphinx extension module names here, as strings. They can be
4242# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
4343extensions = [
44+ 'notfound.extension' ,
4445 'sphinx.ext.autodoc' ,
4546 'sphinx.ext.intersphinx' ,
4647 'sphinx.ext.viewcode' ,
Original file line number Diff line number Diff line change 11[pytest]
2- addopts =
3- --assert =plain
4- --doctest-modules
5- --ignore =setup.py
2+ addopts = --assert =plain --doctest-modules --ignore =setup.py
3+ flake8-ignore =
4+ docs/conf.py E265 E402
5+ parsel/csstranslator.py E402 E501
6+ parsel/selector.py E126 E305 E501
7+ parsel/utils.py E226 E501
8+ parsel/xpathfuncs.py E501
9+ tests/test_selector.py E124 E127 E128 E231 E265 E303 E501 F811 W293
10+ tests/test_selector_csstranslator.py E501
11+ tests/test_utils.py E501
12+ tests/test_xpathfuncs.py E501
Original file line number Diff line number Diff line change 77 -r{toxinidir}/tests/requirements.txt
88commands = py.test --cov =parsel --cov-report = {posargs:docs parsel tests}
99
10+ [testenv:flake8]
11+ basepython = python3.8
12+ deps =
13+ {[testenv]deps}
14+ pytest-flake8
15+ commands =
16+ pytest --flake8
17+
1018[docs]
1119changedir = docs
1220deps =
1321 sphinx
22+ sphinx-notfound-page
1423 sphinx_rtd_theme
1524
1625[testenv:docs]
You can’t perform that action at this time.
0 commit comments