From f18dd6884665f915868d199917075682f7e2e151 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 31 Jan 2021 11:13:54 -0500 Subject: test: configure pytest assertion rewriting in coveragetest.py --- tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/conftest.py') 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. -- cgit v1.2.1