From b9c497a3ab517b234878bece4fc1e5e6ebf617bd Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 3 Jan 2022 08:27:50 +0100 Subject: [PATCH] test: Use .encode() end .decode default values in io-tests Those default to "utf-8" anyway. --- test/io-tests/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/io-tests/test_io.py b/test/io-tests/test_io.py index dedc41581..a84c388ff 100644 --- a/test/io-tests/test_io.py +++ b/test/io-tests/test_io.py @@ -77,7 +77,7 @@ class PostgrestProcess: @pytest.fixture def dburi(): "Postgres database connection URI." - return os.getenv("PGRST_DB_URI").encode("utf-8") + return os.getenv("PGRST_DB_URI").encode() @pytest.fixture @@ -118,7 +118,7 @@ def cli(args, env=None, stdin=None): result = process.communicate(timeout=5)[0] if process.returncode != 0: raise PostgrestError() - return result.decode("utf-8") + return result.decode() finally: process.kill() process.wait()