From 6fdfc8b3ac4b9adb59b5f09d0baf09f8dd44eb57 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 12 Feb 2020 10:32:04 -0500 Subject: [PATCH] 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. --- requirements/testing.txt | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/testing.txt b/requirements/testing.txt index ac67ebf3e50..35e24a51c1d 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -3,6 +3,7 @@ django-dynamic-fixture==2.0.0 pytest==5.2.2 +pytest-custom_exit_code==0.3.0 pytest-django==3.6.0 pytest-xdist==1.30.0 pytest-cov==2.8.1 diff --git a/tox.ini b/tox.ini index 001a6fc123b..6c2f7289b83 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ passenv = CI TRAVIS TRAVIS_* deps = -r{toxinidir}/requirements/testing.txt changedir = {toxinidir}/readthedocs commands = - pytest --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. {posargs} + pytest --cov-report= --cov-config {toxinidir}/.coveragerc --cov=. --suppress-no-test-exit-code {posargs} [testenv:docs] description = build readthedocs documentation