From 1009e1f75405afb60bc2453dc7fd0ca7f283de65 Mon Sep 17 00:00:00 2001 From: Itamar Hindi Date: Wed, 6 Dec 2023 18:49:47 -0500 Subject: [PATCH] Added stdio checker --- testing/test_terminal.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 596c3c67e..05f37a9ab 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1620,6 +1620,11 @@ def pytest_report_header(config, start_path): assert "!This is stderr!" not in stdout assert "!This is a warning log msg!" in stdout + stdout = pytester.runpytest("--show-capture=stdio", "--tb=short").stdout.str() + assert "!This is stdout!" in stdout + assert "!This is stderr!" in stdout + assert "!This is a warning log msg!" not in stdout + stdout = pytester.runpytest("--show-capture=no", "--tb=short").stdout.str() assert "!This is stdout!" not in stdout assert "!This is stderr!" not in stdout