diff --git a/_pytest/terminal.py b/_pytest/terminal.py index af89d0fc2..0bf861ebe 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -290,6 +290,9 @@ class TerminalReporter: if self.isatty: if final: line += " \n" + # Rewrite with empty line so we will not see the artifact of + # previous write + self.rewrite('') self.rewrite(line, bold=True) else: self.write_line(line) diff --git a/changelog/2571.trivial b/changelog/2571.trivial new file mode 100644 index 000000000..45750f122 --- /dev/null +++ b/changelog/2571.trivial @@ -0,0 +1 @@ +Ensure final collected line doesn't include artifacts of previous write.