summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2019-08-23 10:53:36 +0200
committerCarlton Gibson <carlton.gibson@noumenal.es>2019-08-23 10:53:36 +0200
commit9386586f31b8a0bccf59a1bff647cd829d4e79aa (patch)
treef28bf4c9b8b0a1431c1b6722f9d5bb613d78040f /tests/admin_scripts/tests.py
parent7bd963332017eace00be8caf7dc1b7b304da613a (diff)
Replaced subprocess commands by run() wherever possible.
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index d6ea84da7a..1e4477ed34 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -118,12 +118,13 @@ class AdminScriptTestCase(SimpleTestCase):
test_environ['PYTHONPATH'] = os.pathsep.join(python_path)
test_environ['PYTHONWARNINGS'] = ''
- return subprocess.Popen(
+ p = subprocess.run(
[sys.executable, script] + args,
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
cwd=self.test_dir,
env=test_environ, universal_newlines=True,
- ).communicate()
+ )
+ return p.stdout, p.stderr
def run_django_admin(self, args, settings_file=None):
script_dir = os.path.abspath(os.path.join(os.path.dirname(django.__file__), 'bin'))