You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I think what happens here is pytest calls time.time() or a similar monkey-patched function while the frozen_time fixture is still alive.
It would be nice if pytest would insulate itself from freezegun (or raw monkey-patching) shenaningans by keeping local references to the real time.time/whatever it uses.
(Although if you say "you pointed the (freeze)gun at your foot and pulled the trigger, what did you expect", I won't be too mad.)
This is pytest version 4.1.1, imported from .../env/lib/python3.8/site-packages/pytest.py
setuptools registered plugins:
requests-mock-1.8.0 at .../env/lib/python3.8/site-packages/requests_mock/contrib/_pytest_plugin.py
pytest-mock-1.10.0 at .../env/lib/python3.8/site-packages/pytest_mock.py
pytest-cov-2.6.1 at .../env/lib/python3.8/site-packages/pytest_cov/plugin.py
celery-4.4.6 at .../env/lib/python3.8/site-packages/celery/contrib/pytest.py
The text was updated successfully, but these errors were encountered:
I've a test suite that takes >800 seconds to run, and I'm poking at it to see why.
produces this output for me:
Those numbers are absurd.
The test in question looks like this:
and I think what happens here is pytest calls
time.time()
or a similar monkey-patched function while the frozen_time fixture is still alive.It would be nice if pytest would insulate itself from
freezegun
(or raw monkey-patching) shenaningans by keeping local references to the real time.time/whatever it uses.(Although if you say "you pointed the (freeze)gun at your foot and pulled the trigger, what did you expect", I won't be too mad.)
The text was updated successfully, but these errors were encountered: