diff options
author | David Robillard <d@drobilla.net> | 2023-04-03 09:00:39 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-04-06 07:19:10 -0400 |
commit | eecc32d625fb418ea48cd69302d0791a96a25655 (patch) | |
tree | 8b4f5038d8f42510ad455d433ff4133c1e02622b /test/run_suite.py | |
parent | 6f037eb7334f414619ca90ad216740f9ccf6f23e (diff) | |
download | serd-eecc32d625fb418ea48cd69302d0791a96a25655.tar.gz serd-eecc32d625fb418ea48cd69302d0791a96a25655.tar.bz2 serd-eecc32d625fb418ea48cd69302d0791a96a25655.zip |
Simplify stdout capturing code
This is slightly less excruciatingly slow on Windows, sometimes, maybe.
Diffstat (limited to 'test/run_suite.py')
-rwxr-xr-x | test/run_suite.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/run_suite.py b/test/run_suite.py index 3f935fcf..2e93502f 100755 --- a/test/run_suite.py +++ b/test/run_suite.py @@ -43,11 +43,9 @@ def run_eval_test(base_uri, command, in_path, good_path, out_path): syntax = util.syntax_from_path(out_path) command = command + ["-o", syntax, in_path, base_uri] - proc = subprocess.run( - command, check=True, encoding="utf-8", stderr=DEVNULL, stdout=PIPE - ) + with subprocess.Popen(command, stdout=PIPE, encoding="utf-8") as proc: + out = list(proc.stdout) - out = [line + "\n" for line in proc.stdout.split("\n")][:-1] with open(good_path, "r", encoding="utf-8") as good: return util.lines_equal(list(good), out, good_path, out_path) |