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 4, 2020
1 parent 569eea4 commit d6f0032
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 23 deletions.
50 changes: 49 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ packages =
libmodernize.fixes
py_modules = modernize
zip_safe = False
tests_require = nose
python_requires = ~=3.6
install_requires = fissix

Expand All @@ -33,6 +32,9 @@ console_scripts =
[options.extras_require]
docs =
sphinx~=3.2
test =
pytest
pytest-cov

[bdist_wheel]
universal = 1
Expand All @@ -46,3 +48,49 @@ extend-ignore =
[isort]
profile = black
add_imports=from __future__ import generator_stop

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

[coverage:run]
branch = True
source_pkgs =
modernize
libmodernize
source =
tests

[coverage:paths]
source =
.
.tox/*/lib/*/site-packages/
.tox\\*\\Lib\\site-packages\\

[tox:tox]
envlist =
py{36,37,38},lint

[testenv]
deps = https://github.com/graingert/coveragepy/archive/create-way-to-force-package-even-if-filepath-exists.tar.gz#egg=coverage
extras = test
commands = pytest {posargs}

[testenv:coveralls]
passenv = GITHUB_*
deps =
https://github.com/graingert/coveragepy/archive/create-way-to-force-package-even-if-filepath-exists.tar.gz#egg=coverage
coveralls
commands = coveralls

[testenv:lint]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure {posargs}
skip_install = true
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
raise Exception("couldn't find version number")
version = version_match.group(1)

setup(version=version, test_suite="nose.collector")
setup(version=version)
21 changes: 0 additions & 21 deletions tox.ini

This file was deleted.

0 comments on commit d6f0032

Please sign in to comment.