Skip to content

Commit 22d9042

Browse files
committed
Do not allow negative durations
1 parent 88402b7 commit 22d9042

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pytest_split/plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def pytest_sessionfinish(session, exitstatus):
8787
if hasattr(test_report, "duration"):
8888
stage = getattr(test_report, "when", "")
8989
duration = test_report.duration
90+
if duration < 0:
91+
continue
9092
if (
9193
stage == "teardown"
9294
and duration > STORE_DURATIONS_TEARDOWN_THRESHOLD

0 commit comments

Comments
 (0)