Skip to content

Commit

Permalink
configure-pytest-cov
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Sep 1, 2020
1 parent d8a9e55 commit 9a8aeff
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
21 changes: 20 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ packages =
libmodernize.fixes
py_modules = modernize
zip_safe = False
tests_require = nose
python_requires = ~=3.6
install_requires = fissix

[options.extras_require]
test =
pytest
pytest-cov

[options.entry_points]
console_scripts =
python-modernize = libmodernize.main:main
Expand All @@ -38,3 +42,18 @@ extend-ignore =

[isort]
profile = black

[tool:pytest]
addopts =
--strict-config
--strict-markers
--cov
--cov-report=term-missing:skip-covered
--cov-config=setup.cfg
xfail_strict = True
junit_family = xunit2
filterwarnings =
error

[coverage:run]
branch = True
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
raise Exception("couldn't find version number")
version = version_match.group(1)

setup(version=version, test_suite="nose.collector")
setup(version=version)
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ envlist =

[testenv]
deps =
six >= 1.13.0
coverage
.[test]
commands =
coverage run --branch --source=libmodernize setup.py test {posargs}
pytest {posargs}

[testenv:coveralls]
passenv = TRAVIS TRAVIS_*
Expand Down

0 comments on commit 9a8aeff

Please sign in to comment.