Skip to content

Commit

Permalink
Configure pytest and add setup.py test command
Browse files Browse the repository at this point in the history
  • Loading branch information
DonDebonair committed Sep 1, 2017
1 parent 51e555f commit cb83868
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ exclude =
dist,
build,
tests
max-line-length=100
max-line-length=100

[aliases]
test=pytest

[tool:pytest]
addopts = --cov-config .coveragerc --verbose --cov-report term-missing --cov=machine
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def run(self):
url=about["__uri__"],
author=about["__author__"],
author_email=about["__email__"],
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-cov', 'coverage'],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ deps =-r{toxinidir}/requirements-dev.txt

[testenv:py36]
passenv = CI TRAVIS TRAVIS_*
commands = pytest --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=machine tests
commands = pytest --cov-config .coveragerc --verbose --cov-report term-missing --cov-report xml --cov=machine tests

[testenv:flake8]
deps = flake8
Expand Down

0 comments on commit cb83868

Please sign in to comment.