From 613086ac7dbd46fc1c45f3f444c39550500168e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Tue, 31 Mar 2020 18:22:24 +0300 Subject: [PATCH] Strip newlines on test output (Windows-compat). --- tests/test_auto_reload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_auto_reload.py b/tests/test_auto_reload.py index 7a63249f..0a6083ce 100644 --- a/tests/test_auto_reload.py +++ b/tests/test_auto_reload.py @@ -36,11 +36,11 @@ async def test_reloader_live(runargs): filename = os.path.join(tmpdir, "reloaderapp.py") text = write_app(filename, **runargs) with subprocess.Popen([sys.executable, filename], stdout=subprocess.PIPE) as proc: - line = (l.decode() for l in proc.stdout if l.startswith(b"complete")) + line = (l.decode().strip() for l in proc.stdout if l.startswith(b"complete")) try: - assert next(line) == f"complete {text}\n" + assert next(line) == f"complete {text}" # Edit source code and try again text = write_app(filename) - assert next(line) == f"complete {text}\n" + assert next(line) == f"complete {text}" finally: proc.terminate()