aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_easy_install.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-20 21:11:36 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-20 21:11:36 -0500
commit209fbc31d5df376de6db40bc6b1d1d50e87a0a83 (patch)
treebe2c7e7581cdf22aab28dbaeb59a1f6aeb0f2602 /setuptools/tests/test_easy_install.py
parent2554cbb108a56ab4932e7f1a773f5a57abdabcd2 (diff)
downloadexternal_python_setuptools-209fbc31d5df376de6db40bc6b1d1d50e87a0a83.tar.gz
external_python_setuptools-209fbc31d5df376de6db40bc6b1d1d50e87a0a83.tar.bz2
external_python_setuptools-209fbc31d5df376de6db40bc6b1d1d50e87a0a83.zip
Move global into the only method where it's used.
Diffstat (limited to 'setuptools/tests/test_easy_install.py')
-rw-r--r--setuptools/tests/test_easy_install.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 51d6f094..ab6a8f0d 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -47,18 +47,6 @@ class FakeDist(object):
def as_requirement(self):
return 'spec'
-WANTED = ei.CommandSpec.best().from_environment().as_header() + DALS("""
- # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
- __requires__ = 'spec'
- import sys
- from pkg_resources import load_entry_point
-
- if __name__ == '__main__':
- sys.exit(
- load_entry_point('spec', 'console_scripts', 'name')()
- )
- """)
-
SETUP_PY = DALS("""
from setuptools import setup
@@ -80,12 +68,24 @@ class TestEasyInstallTest:
shutil.rmtree(cmd.install_dir)
def test_get_script_args(self):
+ header = ei.CommandSpec.best().from_environment().as_header()
+ expected = header + DALS("""
+ # EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
+ __requires__ = 'spec'
+ import sys
+ from pkg_resources import load_entry_point
+
+ if __name__ == '__main__':
+ sys.exit(
+ load_entry_point('spec', 'console_scripts', 'name')()
+ )
+ """)
dist = FakeDist()
args = next(ei.ScriptWriter.get_args(dist))
name, script = itertools.islice(args, 2)
- assert script == WANTED
+ assert script == expected
def test_no_find_links(self):
# new option '--no-find-links', that blocks find-links added at