Restore tracing function (when run with Coverage.py). https://bugs.python.org/issue37011
()
| 10 | |
| 11 | @pytest.fixture(autouse=True) |
| 12 | def restore_tracing(): |
| 13 | """Restore tracing function (when run with Coverage.py). |
| 14 | |
| 15 | https://bugs.python.org/issue37011 |
| 16 | """ |
| 17 | orig_trace = sys.gettrace() |
| 18 | yield |
| 19 | if sys.gettrace() != orig_trace: |
| 20 | sys.settrace(orig_trace) |
| 21 | |
| 22 | |
| 23 | @pytest.hookimpl(hookwrapper=True, tryfirst=True) |
nothing calls this directly
no outgoing calls
no test coverage detected