From 64dba9134520547180d2e9404f5a7b592e560ae5 Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Mon, 24 Mar 2025 17:38:41 -0400
Subject: Always specify encoding to subprocess run functions

---
 test/test_write_error.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'test/test_write_error.py')

diff --git a/test/test_write_error.py b/test/test_write_error.py
index b62f981a..93b0249a 100755
--- a/test/test_write_error.py
+++ b/test/test_write_error.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 
-# Copyright 2022-2023 David Robillard <d@drobilla.net>
+# Copyright 2022-2025 David Robillard <d@drobilla.net>
 # SPDX-License-Identifier: ISC
 
 """Test errors writing to a file."""
@@ -18,11 +18,15 @@ command = shlex.split(args.wrapper) + [args.serdi, args.input]
 if os.path.exists("/dev/full"):
     with open("/dev/full", "w", encoding="utf-8") as out:
         proc = subprocess.run(
-            command, check=False, stdout=out, stderr=subprocess.PIPE
+            command,
+            encoding="utf-8",
+            check=False,
+            stdout=out,
+            stderr=subprocess.PIPE,
         )
 
     assert proc.returncode != 0
-    assert "error" in proc.stderr.decode("utf-8")
+    assert "error" in proc.stderr
 
 else:
     sys.stderr.write("warning: /dev/full not present, skipping test")
-- 
cgit v1.2.1