8000 Use pytest-flake8 · nirum-lang/nirum-python@f977194 · GitHub
[go: up one dir, main page]

Skip to content

Commit f977194

Browse files
committed
Use pytest-flake8
1 parent 09efd9e commit f977194

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ install:
77
- pip install -U pip setuptools docutils
88
- pip install -e .[tests]
99
script:
10-
- pytest tests -v
11-
- pip install 'typing<3.5.2' && pytest tests -v
10+
- pytest -v
11+
- pip install 'typing<3.5.2' && pytest -v
1212
- rst2html.py --strict CHANGES.rst
1313
- rst2html.py --strict README.rst
1414
- python setup.py --long-description | rst2html.py --strict

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ def get_version():
4040
] + service_requires
4141
tests_require = [
4242
'pytest >= 3.1.2, < 4.0.0',
43+
'pytest-flake8 >= 0.8.1, < 1.0.0',
4344
'import-order',
44-
'flake8',
45-
'tox',
4645
]
4746
docs_require = [
4847
'Sphinx',

tests/func_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
def test_import_string():
99
assert import_string('collections:OrderedDict') == collections.OrderedDict
10-
assert import_string('collections:OrderedDict({"a": 1})') == \
11-
collections.OrderedDict({"a": 1})
10+
assert (import_string('collections:OrderedDict({"a": 1})') ==
11+
collections.OrderedDict({"a": 1}))
1212
with raises(ValueError):
1313
# malformed
1414
import_string('world')

tox.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ envlist = py27,py34,py35,docs
44
[testenv]
55
deps = -e.[tests]
66
commands=
7-
pytest -v tests
7+
pytest -v
88

99
[testenv:docs]
1010
basepython = python3
@@ -13,3 +13,9 @@ commands =
1313
rst2html.py --strict CHANGES.rst
1414
rst2html.py --strict README.rst
1515
python3 setup.py --long-description | rst2html.py --strict
16+
17+
[pytest]
18+
addopts = --ff --flake8
19+
20+
[flake8]
21+
exclude = .env, .tox, tests/py2_nirum.py, tests/py3_nirum.py

0 commit comments

Comments
 (0)
0