diff options
author | David Robillard <d@drobilla.net> | 2022-11-15 16:16:57 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-11-15 16:16:57 -0500 |
commit | 1c06094202f2254f33ce05bcebf227c95712d7b3 (patch) | |
tree | a89c100d267ddb086fa3f008965e542cfb64b248 | |
parent | 93c0b1867435a097f9143058b1b96d1ed8c8b1b9 (diff) | |
download | serd-1c06094202f2254f33ce05bcebf227c95712d7b3.tar.gz serd-1c06094202f2254f33ce05bcebf227c95712d7b3.tar.bz2 serd-1c06094202f2254f33ce05bcebf227c95712d7b3.zip |
Fix potential Python errors on test suite failure
-rwxr-xr-x | test/run_test_suite.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py index 3ea0c604..94571f72 100755 --- a/test/run_test_suite.py +++ b/test/run_test_suite.py @@ -159,11 +159,11 @@ def _load_rdf(filename, base_uri, command_prefix): instances = {} cmd = command_prefix + [filename, base_uri] - proc = subprocess.run(cmd, capture_output=True, check=True) + proc = subprocess.run( + cmd, capture_output=True, encoding="utf-8", check=True + ) for line in proc.stdout.splitlines(): - matches = re.match( - r"<([^ ]*)> <([^ ]*)> <([^ ]*)> \.", line.decode("utf-8") - ) + matches = re.match(r"<([^ ]*)> <([^ ]*)> <([^ ]*)> \.", line) if matches: s, p, o = (matches.group(1), matches.group(2), matches.group(3)) if s not in model: @@ -398,7 +398,7 @@ if __name__ == "__main__": sys.exit(main()) except subprocess.CalledProcessError as e: if e.stderr is not None: - sys.stderr.write(e.stderr.decode("utf-8")) + sys.stderr.write(e.stderr) sys.stderr.write("error: %s\n" % e) sys.exit(e.returncode) |