diff --git a/changelog/4329.bugfix.rst b/changelog/4329.bugfix.rst new file mode 100644 index 000000000..6acfe7e61 --- /dev/null +++ b/changelog/4329.bugfix.rst @@ -0,0 +1 @@ +Fix TypeError in report_collect with _collect_report_last_write. diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index a00dc0842..dde2750be 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -497,7 +497,10 @@ class TerminalReporter(object): if not final: # Only write "collecting" report every 0.5s. t = time.time() - if self._collect_report_last_write > t - 0.5: + if ( + self._collect_report_last_write is not None + and self._collect_report_last_write > t - 0.5 + ): return self._collect_report_last_write = t