Skip to content

Commit 583c404

Browse files
committed
Only install and invoke pytest-black on Python 3
1 parent 19db5b9 commit 583c404

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[pytest]
22
norecursedirs=dist build .tox .eggs
3-
addopts=--doctest-modules --flake8 --black
3+
addopts=--doctest-modules --flake8
44
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
55
filterwarnings=
66
ignore:Possible nested set::pycodestyle:113

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ testing =
2929
pytest >= 3.5, !=3.7.3
3030
pytest-checkdocs
3131
pytest-flake8
32-
pytest-black
32+
pytest-black; python_version >= "3"
3333

3434
# local
3535

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ tox_pip_extensions_ext_venv_update = true
88
deps =
99
setuptools>=31.0.1
1010
commands =
11-
pytest {posargs}
11+
!py27: pytest --black {posargs}
12+
py27: pytest {posargs}
1213
usedevelop = True
1314
extras = testing
1415

0 commit comments

Comments
 (0)