Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
4378eda9
Commit
4378eda9
authored
Aug 09, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test_get_script_header failures on Windows when Python is in a directory with spaces
parent
27d755c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
setuptools/tests/test_resources.py
setuptools/tests/test_resources.py
+6
-3
No files found.
setuptools/tests/test_resources.py
View file @
4378eda9
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment