mirror of
https://github.com/django/django.git
synced 2025-08-30 07:17:49 +00:00
Replaced subprocess commands by run() wherever possible.
This commit is contained in:
parent
7bd9633320
commit
9386586f31
13 changed files with 42 additions and 42 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue