summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
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'))