Commit 93847bd1 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract variable for clearer assertion.

parent 75501354
...@@ -453,11 +453,8 @@ class TestScriptHeader: ...@@ -453,11 +453,8 @@ class TestScriptHeader:
def test_get_script_header_jython_workaround(self): def test_get_script_header_jython_workaround(self):
# A mock sys.executable that uses a shebang line (this file) # A mock sys.executable that uses a shebang line (this file)
exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py')
assert ( header = get_script_header('#!/usr/local/bin/python', executable=exe)
get_script_header('#!/usr/local/bin/python', executable=exe) assert header == '#!/usr/bin/env %s\n' % exe
==
'#!/usr/bin/env %s\n' % exe
)
with contexts.quiet() as (stdout, stderr): with contexts.quiet() as (stdout, stderr):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment