Skip to content

Commit f06fe43

Browse files
authored
Merge pull request #4330 from blueyed/fix-report-last-write
Fix TypeError in report_collect with _collect_report_last_write
2 parents 64762d2 + 91404db commit f06fe43

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog/4329.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix TypeError in report_collect with _collect_report_last_write.

src/_pytest/terminal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,10 @@ def report_collect(self, final=False):
497497
if not final:
498498
# Only write "collecting" report every 0.5s.
499499
t = time.time()
500-
if self._collect_report_last_write > t - 0.5:
500+
if (
501+
self._collect_report_last_write is not None
502+
and self._collect_report_last_write > t - 0.5
503+
):
501504
return
502505
self._collect_report_last_write = t
503506

0 commit comments

Comments
 (0)