aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_write_error.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-28 12:12:34 -0400
committerDavid Robillard <d@drobilla.net>2023-04-05 09:45:15 -0400
commit4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706 (patch)
tree89ece7e437e820a01560522f738f8ee9a8070afb /test/test_write_error.py
parentd25435678a9ced05bd3a8c78ae3534c230fdfc5d (diff)
downloadserd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.tar.gz
serd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.tar.bz2
serd-4bfbbd357d4e12522f5e8ba0a0ebc3bfc037b706.zip
Clean up Python scripts and add a formatting test
Diffstat (limited to 'test/test_write_error.py')
-rwxr-xr-xtest/test_write_error.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test_write_error.py b/test/test_write_error.py
index e6788a76..35fde232 100755
--- a/test/test_write_error.py
+++ b/test/test_write_error.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright 2022 David Robillard <d@drobilla.net>
+# Copyright 2022-2023 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: ISC
"""Test errors writing to a file."""
@@ -21,8 +21,7 @@ args = parser.parse_args(sys.argv[1:])
command = shlex.split(args.wrapper) + [args.serdi, args.input]
if os.path.exists("/dev/full"):
-
- with open("/dev/full", "w") as out:
+ with open("/dev/full", "w", encoding="utf-8") as out:
proc = subprocess.run(
command, check=False, stdout=out, stderr=subprocess.PIPE
)