mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[1.1.X] Fixed #13173: Made the admin_scripts tests pass when the running python executable has a space in its pathname. Thanks gabrielhurley.
r12842 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
21a1a21d0b
commit
f0ed1ce683
@ -102,8 +102,12 @@ class AdminScriptTestCase(unittest.TestCase):
|
|||||||
os.environ[python_path_var_name] = os.pathsep.join(python_path)
|
os.environ[python_path_var_name] = os.pathsep.join(python_path)
|
||||||
|
|
||||||
# Build the command line
|
# Build the command line
|
||||||
cmd = '%s "%s"' % (sys.executable, script)
|
executable = sys.executable
|
||||||
cmd += ''.join([' %s' % arg for arg in args])
|
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
|
# Move to the test directory and run
|
||||||
os.chdir(test_dir)
|
os.chdir(test_dir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user