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
2f2011b3
Commit
2f2011b3
authored
Dec 24, 2015
by
Erik Bray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing test on Windows due to path formatting bugs
parent
3f4ef895
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+8
-3
No files found.
setuptools/tests/test_easy_install.py
View file @
2f2011b3
...
...
@@ -446,10 +446,15 @@ class TestScriptHeader:
exe
=
tmpdir
/
'exe.py'
with
exe
.
open
(
'w'
)
as
f
:
f
.
write
(
header
)
exe
=
str
(
exe
)
exe
=
ei
.
nt_quote_arg
(
os
.
path
.
normpath
(
str
(
exe
)))
# Make sure Windows paths are quoted properly before they're sent
# through shlex.split by get_script_header
executable
=
'"%s"'
%
exe
if
os
.
path
.
splitdrive
(
exe
)[
0
]
else
exe
header
=
ei
.
ScriptWriter
.
get_script_header
(
'#!/usr/local/bin/python'
,
executable
=
exe
)
executable
=
exe
cutable
)
assert
header
==
'#!/usr/bin/env %s
\
n
'
%
exe
expect_out
=
'stdout'
if
sys
.
version_info
<
(
2
,
7
)
else
'stderr'
...
...
@@ -458,7 +463,7 @@ class TestScriptHeader:
# When options are included, generate a broken shebang line
# with a warning emitted
candidate
=
ei
.
ScriptWriter
.
get_script_header
(
'#!/usr/bin/python -x'
,
executable
=
exe
)
executable
=
exe
cutable
)
assert
candidate
==
'#!%s -x
\
n
'
%
exe
output
=
locals
()[
expect_out
]
assert
'Unable to adapt shebang line'
in
output
.
getvalue
()
...
...
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