Closed pshv closed 4 years ago
Thanks for the report! And apologies for breaking coverage support. I just released 1.4.1 which I think should fix this.
/cc @Mattwmaster58
Oof, seems like I assumed every function object would have a __module__
attribute which clearly wasn't the case. Good call to use inspect.getmodule
, and a test as well!
There's an error with is_debugging() method introduced in 1.4.0 and pytest-cov plugin. I'm running on Windows and using following test-case to reproduce:
def test(): time.sleep(3)
test.py::test PASSED [100%]Exception in thread pytest_timeout test.py::test: Traceback (most recent call last): File "C:\Python37\lib\threading.py", line 926, in _bootstrap_inner self.run() File "C:\Python37\lib\threading.py", line 1178, in run self.function(*self.args, **self.kwargs) File "C:\Python37\lib\site-packages\pytest_timeout.py", line 378, in timeout_timer if is_debugging(): File "C:\Python37\lib\site-packages\pytest_timeout.py", line 177, in is_debugging if name in trace_func.module: AttributeError: 'coverage.CTracer' object has no attribute 'module'