We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21680ff commit 1b7597aCopy full SHA for 1b7597a
testing/conftest.py
@@ -1,6 +1,21 @@
1
# -*- coding: utf-8 -*-
2
+import sys
3
+
4
import pytest
5
6
+if sys.gettrace():
7
8
+ @pytest.fixture(autouse=True)
9
+ def restore_tracing():
10
+ """Restore tracing function (when run with Coverage.py).
11
12
+ https://bugs.python.org/issue37011
13
+ """
14
+ orig_trace = sys.gettrace()
15
+ yield
16
+ if sys.gettrace() != orig_trace:
17
+ sys.settrace(orig_trace)
18
19
20
@pytest.hookimpl(hookwrapper=True, tryfirst=True)
21
def pytest_collection_modifyitems(config, items):
0 commit comments