diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-03 03:18:01 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-03 03:18:01 -0500 |
| commit | 75501354959789632a7f133edc1fc90decf061c0 (patch) | |
| tree | 7d683d8c853e958d41e8c9e6dde3a5224fb1d9c2 /setuptools/tests/test_easy_install.py | |
| parent | a1ef38f99bc7df9464c4a2bcb3c374a9c81da6d1 (diff) | |
| download | python-setuptools-git-75501354959789632a7f133edc1fc90decf061c0.tar.gz | |
Pull logic out of the context
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
| -rw-r--r-- | setuptools/tests/test_easy_install.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f45e5c63..fac13104 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -451,14 +451,15 @@ class TestScriptHeader: mock.Mock(getProperty=mock.Mock(return_value=""))))) @mock.patch('sys.platform', 'java1.5.0_13') def test_get_script_header_jython_workaround(self): + # A mock sys.executable that uses a shebang line (this file) + exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') + assert ( + get_script_header('#!/usr/local/bin/python', executable=exe) + == + '#!/usr/bin/env %s\n' % exe + ) + with contexts.quiet() as (stdout, stderr): - # A mock sys.executable that uses a shebang line (this file) - exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py') - assert ( - get_script_header('#!/usr/local/bin/python', executable=exe) - == - '#!/usr/bin/env %s\n' % exe - ) # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted |
