Skip to content

Commit

Permalink
Document freezegun issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-git committed Mar 7, 2020
1 parent a9191ea commit 37005b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pytest_split/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

from _pytest.config import create_terminal_writer

# For some reason pytest reports some teardown durations to be 10M - 100M seconds long
# Thus we have this threshold to not take into account the ones which are
# definitely not correct
# Ugly hacks for freezegun compatibility: https://github.com/spulec/freezegun/issues/286
STORE_DURATIONS_TEARDOWN_THRESHOLD = 60 * 10 # seconds


Expand Down Expand Up @@ -87,6 +85,7 @@ def pytest_sessionfinish(session, exitstatus):
if hasattr(test_report, "duration"):
stage = getattr(test_report, "when", "")
duration = test_report.duration
# These ifs be removed after this is solved: https://github.com/spulec/freezegun/issues/286
if duration < 0:
continue
if (
Expand Down

0 comments on commit 37005b5

Please sign in to comment.