Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.1.X] Fixed #13173: Made the admin_scripts tests pass when the runn…

…ing 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
  • Loading branch information...
commit f0ed1ce6832c1ea54c3d324911c43a25aec99c4e 1 parent 21a1a21
@kmtracey kmtracey authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 tests/regressiontests/admin_scripts/tests.py
View
8 tests/regressiontests/admin_scripts/tests.py
@@ -102,8 +102,12 @@ def run_test(self, script, args, settings_file=None, apps=None):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.