From 5cdead288fc7ab43c48e00e2d6cd2b3ffe3850f8 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:44:50 -0400 Subject: [PATCH] test: Add missing io.BufferedReader to simulate sys.stdin.buffer correctly --- tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 876a7e7f7..e68480295 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -39,7 +39,7 @@ def stderr_as_stdout(): @contextmanager def stdin_as_string(content): temp = sys.stdin - sys.stdin = io.TextIOWrapper(content) + sys.stdin = io.TextIOWrapper(io.BufferedReader(content)) yield sys.stdin = temp