Skip to content

Commit

Permalink
Do not allow negative durations
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-git committed Feb 15, 2020
1 parent 88402b7 commit 22d9042
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pytest_split/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def pytest_sessionfinish(session, exitstatus):
if hasattr(test_report, "duration"):
stage = getattr(test_report, "when", "")
duration = test_report.duration
if duration < 0:
continue
if (
stage == "teardown"
and duration > STORE_DURATIONS_TEARDOWN_THRESHOLD
Expand Down

0 comments on commit 22d9042

Please sign in to comment.