summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_integration.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-02 08:00:10 -0700
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-11-04 11:21:25 +0100
commite0e88ceaaae4b27913cc9d3b48bf79c681605fba (patch)
treed5be1bca88abc57dff70b34578331cc280f6445e /tests/postgres_tests/test_integration.py
parent5a856669bf0574f612eea89e72a6b0a3d2cb80d9 (diff)
Refs #30116 -- Simplified stdout/stderr decoding with subprocess.run()'s encoding argument.
The encoding argument has been available since Python 3.6. https://docs.python.org/3/library/subprocess.html#subprocess.run
Diffstat (limited to 'tests/postgres_tests/test_integration.py')
-rw-r--r--tests/postgres_tests/test_integration.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/postgres_tests/test_integration.py b/tests/postgres_tests/test_integration.py
index da3ccb028d..db082a6495 100644
--- a/tests/postgres_tests/test_integration.py
+++ b/tests/postgres_tests/test_integration.py
@@ -16,7 +16,7 @@ class PostgresIntegrationTests(PostgreSQLSimpleTestCase):
stdout=subprocess.DEVNULL,
stderr=subprocess.PIPE,
cwd=os.path.dirname(__file__),
- env=test_environ
+ env=test_environ,
+ encoding='utf-8',
)
- stderr = '\n'.join([e.decode() for e in result.stderr.splitlines()])
- self.assertEqual(result.returncode, 0, msg=stderr)
+ self.assertEqual(result.returncode, 0, msg=result.stderr)