diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-09 21:52:34 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-08-09 21:52:34 -0400 |
commit | 4378eda9d4c5d20a79d6df6770ed83421fc1abcb (patch) | |
tree | d582a27764b8988f98fad0470fad32ae059eb556 /setuptools/tests/test_resources.py | |
parent | 27d755c7c26d3b677134accf6a92de58e6e97827 (diff) | |
download | external_python_setuptools-4378eda9d4c5d20a79d6df6770ed83421fc1abcb.tar.gz external_python_setuptools-4378eda9d4c5d20a79d6df6770ed83421fc1abcb.tar.bz2 external_python_setuptools-4378eda9d4c5d20a79d6df6770ed83421fc1abcb.zip |
Fixed test_get_script_header failures on Windows when Python is in a directory with spaces
Diffstat (limited to 'setuptools/tests/test_resources.py')
-rw-r--r-- | setuptools/tests/test_resources.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 06fbba50..15f44da4 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -13,7 +13,8 @@ from pkg_resources import (parse_requirements, VersionConflict, parse_version, Distribution, EntryPoint, Requirement, safe_version, safe_name, WorkingSet) -from setuptools.command.easy_install import get_script_header, is_sh +from setuptools.command.easy_install import (get_script_header, is_sh, + nt_quote_arg) from setuptools.compat import StringIO, iteritems try: @@ -505,10 +506,12 @@ class ScriptHeaderTests(TestCase): def test_get_script_header(self): if not sys.platform.startswith('java') or not is_sh(sys.executable): # This test is for non-Jython platforms + expected = '#!%s\n' % nt_quote_arg(os.path.normpath(sys.executable)) self.assertEqual(get_script_header('#!/usr/local/bin/python'), - '#!%s\n' % os.path.normpath(sys.executable)) + expected) + expected = '#!%s -x\n' % nt_quote_arg(os.path.normpath(sys.executable)) self.assertEqual(get_script_header('#!/usr/bin/python -x'), - '#!%s -x\n' % os.path.normpath(sys.executable)) + expected) self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) |