Kaydet (Commit) c62c47e6 authored tarafından Karen Tracey's avatar Karen Tracey

Fixed #13173: Made the admin_scripts tests pass when the running python…

Fixed #13173: Made the admin_scripts tests pass when the running python executable has a space in its pathname. Thanks gabrielhurley.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 8dbd8b1c
......@@ -101,8 +101,12 @@ class AdminScriptTestCase(unittest.TestCase):
os.environ[python_path_var_name] = os.pathsep.join(python_path)
# Build the command line
cmd = '%s "%s"' % (sys.executable, script)
cmd += ''.join([' %s' % arg for arg in args])
executable = sys.executable
arg_string = ' '.join(['%s' % arg for arg in args])
if ' ' in executable:
cmd = '""%s" "%s" %s"' % (executable, script, arg_string)
else:
cmd = '%s "%s" %s' % (executable, script, arg_string)
# Move to the test directory and run
os.chdir(test_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment