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
a48e96b5
Commit
a48e96b5
authored
Sep 23, 2018
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests to remove use of deprecated get_script_header
parent
da3d5f36
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+5
-5
No files found.
setuptools/tests/test_easy_install.py
View file @
a48e96b5
...
...
@@ -756,24 +756,24 @@ class TestScriptHeader:
def
test_get_script_header
(
self
):
expected
=
'#!%s
\
n
'
%
ei
.
nt_quote_arg
(
os
.
path
.
normpath
(
sys
.
executable
))
actual
=
ei
.
ScriptWriter
.
get_
script_
header
(
'#!/usr/local/bin/python'
)
actual
=
ei
.
ScriptWriter
.
get_header
(
'#!/usr/local/bin/python'
)
assert
actual
==
expected
def
test_get_script_header_args
(
self
):
expected
=
'#!%s -x
\
n
'
%
ei
.
nt_quote_arg
(
os
.
path
.
normpath
(
sys
.
executable
))
actual
=
ei
.
ScriptWriter
.
get_
script_
header
(
'#!/usr/bin/python -x'
)
actual
=
ei
.
ScriptWriter
.
get_header
(
'#!/usr/bin/python -x'
)
assert
actual
==
expected
def
test_get_script_header_non_ascii_exe
(
self
):
actual
=
ei
.
ScriptWriter
.
get_
script_
header
(
actual
=
ei
.
ScriptWriter
.
get_header
(
'#!/usr/bin/python'
,
executable
=
self
.
non_ascii_exe
)
expected
=
str
(
'#!%s -x
\
n
'
)
%
self
.
non_ascii_exe
assert
actual
==
expected
def
test_get_script_header_exe_with_spaces
(
self
):
actual
=
ei
.
ScriptWriter
.
get_
script_
header
(
actual
=
ei
.
ScriptWriter
.
get_header
(
'#!/usr/bin/python'
,
executable
=
'"'
+
self
.
exe_with_spaces
+
'"'
)
expected
=
'#!"%s"
\
n
'
%
self
.
exe_with_spaces
...
...
@@ -817,7 +817,7 @@ class TestCommandSpec:
class
TestWindowsScriptWriter
:
def
test_header
(
self
):
hdr
=
ei
.
WindowsScriptWriter
.
get_
script_
header
(
''
)
hdr
=
ei
.
WindowsScriptWriter
.
get_header
(
''
)
assert
hdr
.
startswith
(
'#!'
)
assert
hdr
.
endswith
(
'
\
n
'
)
hdr
=
hdr
.
lstrip
(
'#!'
)
...
...
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