Skip to content

Commit 6fdfc8b

Browse files
committed
Add pytest-custom_exit_code
This is to allow us to ignore the exit code from pytest when no tests were collected, when using the -k option, for example.
1 parent c37dd7c commit 6fdfc8b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

requirements/testing.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
django-dynamic-fixture==2.0.0
55
pytest==5.2.2
6+
pytest-custom_exit_code==0.3.0
67
pytest-django==3.6.0
78
pytest-xdist==1.30.0
89
pytest-cov==2.8.1

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ passenv = CI TRAVIS TRAVIS_*
1919
deps = -r{toxinidir}/requirements/testing.txt
2020
changedir = {toxinidir}/readthedocs
2121
commands =
22-
pytest --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
22+
pytest --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. --suppress-no-test-exit-code {posargs}
2323

2424
[testenv:docs]
2525
description = build readthedocs documentation

0 commit comments

Comments
 (0)