From 9386586f31b8a0bccf59a1bff647cd829d4e79aa Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 23 Aug 2019 10:53:36 +0200 Subject: Replaced subprocess commands by run() wherever possible. --- tests/admin_scripts/tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/admin_scripts') 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')) -- cgit v1.3