summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-01-31 11:13:54 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-01-31 11:13:54 -0500
commitf18dd6884665f915868d199917075682f7e2e151 (patch)
tree104a0a6a1133e5d07a94ad9ad3b9f5717442188e
parentd02be78c3a0ee3022be56c623bb9bdcad1e9acd4 (diff)
downloadpython-coveragepy-git-f18dd6884665f915868d199917075682f7e2e151.tar.gz
test: configure pytest assertion rewriting in coveragetest.py
-rw-r--r--tests/conftest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 10761cdd..c2e0a893 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -16,6 +16,10 @@ import pytest
from coverage import env
+# Pytest will rewrite assertions in test modules, but not elsewhere.
+# This tells pytest to also rewrite assertions in coveragetest.py.
+pytest.register_assert_rewrite("tests.coveragetest")
+
# Pytest can take additional options:
# $set_env.py: PYTEST_ADDOPTS - Extra arguments to pytest.