From 1b05b0a53a9d4c0611e4b6398d7852e330b40cf1 Mon Sep 17 00:00:00 2001 From: "Terence S.-C. Tsang" Date: Sat, 30 Aug 2025 22:59:35 +0200 Subject: [PATCH] removed `capsys.disabled()` which caused spurious output --- tests/test_cli.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 082cb757..a347bf0b 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -210,9 +210,8 @@ def sum_nsq(n: int) -> int: # View them and check the output checks = {} out, err = capsys.readouterr() - with capsys.disabled(): - print(out, end='') - print(err, end='', file=stderr) + print(out, end='') + print(err, end='', file=stderr) for func in sum_n, sum_nsq: for comment, n in zip(['Loop', 'Return'], nhits[func]): checks[f' # {comment}: {func.__name__}'] = n