Closed mtelka closed 1 year ago
The problem is caused by this monkeypatching here: https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/tests/conftest.py#L76-L91
My plugin expects that the default timer has a valid and importable qualname.
Because I don't have control over when my plugin is actually imported there's little I can do from my side besides having a confusing default for the --benchmark-timer
option that won't get messed up by incomplete monkeypatching. I don't really want that.
My suggestion is to add something along these lines in that fixture:
time.__module__ = 'time'
time.__name__ = 'perf_counter'
When there is
pytest-benchmark
installed few tests forhypothesis
Python project fails. For more details please see https://github.com/HypothesisWorks/hypothesis/issues/3642