mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
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
This commit is contained in:
committed by
Mariusz Felisiak
parent
5a856669bf
commit
e0e88ceaaa
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user