Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_console_output: Fix WrappedIO.writelines with iterator.
Anders Kaseorgf74cfe0ed5c3
diff --git a/zerver/lib/test_console_output.py b/zerver/lib/test_console_output.pyindex a0561168df8..e149dd1a06e 100644--- a/zerver/lib/test_console_output.py+++ b/zerver/lib/test_console_output.py@@ -1,3 +1,4 @@+import itertoolsimport loggingimport reimport sys@@ -102,8 +103,9 @@ class WrappedIO(IO[bytes]):return num_charsdef writelines(self, data: Iterable[bytes]) -> None:+ data, data_copy = itertools.tee(data)self.stream.writelines(data)- lines = b"".join(data)+ lines = b"".join(data_copy)self.extra_output_finder.find_extra_output(lines)def __next__(self) -> bytes: