Skip to content

Commit c2dab2f

Browse files
committed
configure-pytest-cov
1 parent ecd23e2 commit c2dab2f

File tree

3 files changed

+50
-23
lines changed

3 files changed

+50
-23
lines changed

setup.cfg

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ packages =
2121
libmodernize.fixes
2222
py_modules = modernize
2323
zip_safe = False
24-
tests_require = nose
2524
python_requires = ~=3.6
2625
install_requires = fissix
2726

@@ -33,6 +32,10 @@ console_scripts =
3332
[options.extras_require]
3433
docs =
3534
sphinx~=3.2
35+
test =
36+
pytest
37+
pytest-cov
38+
coverage>=5.3
3639

3740
[bdist_wheel]
3841
universal = 1
@@ -46,3 +49,48 @@ extend-ignore =
4649
[isort]
4750
profile = black
4851
add_imports=from __future__ import generator_stop
52+
53+
[tool:pytest]
54+
addopts =
55+
--strict-config
56+
--strict-markers
57+
--cov
58+
--cov-report=term-missing:skip-covered
59+
xfail_strict = True
60+
junit_family = xunit2
61+
filterwarnings =
62+
error
63+
64+
[coverage:run]
65+
branch = True
66+
source_pkgs =
67+
modernize
68+
libmodernize
69+
source =
70+
tests
71+
72+
[coverage:paths]
73+
source =
74+
.
75+
.tox/*/lib/*/site-packages/
76+
.tox\\*\\Lib\\site-packages\\
77+
78+
[tox:tox]
79+
envlist =
80+
py{36,37,38},lint
81+
82+
[testenv]
83+
extras = test
84+
commands = pytest {posargs}
85+
86+
[testenv:coveralls]
87+
passenv = GITHUB_*
88+
deps =
89+
coveralls
90+
coverage>=5.3
91+
commands = coveralls
92+
93+
[testenv:lint]
94+
deps = pre-commit
95+
commands = pre-commit run --all-files --show-diff-on-failure {posargs}
96+
skip_install = true

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
raise Exception("couldn't find version number")
1414
version = version_match.group(1)
1515

16-
setup(version=version, test_suite="nose.collector")
16+
setup(version=version)

tox.ini

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)