summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_egg_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-02 09:59:44 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-02 09:59:44 -0500
commite814d51b89cdfb3cd5ec567726c5756f6872041e (patch)
tree3ba4a67788b1ec7bda78f0270babbcae78da0480 /setuptools/tests/test_egg_info.py
parentb21f02bdaeab48de81c90142b5ff80c900739613 (diff)
downloadpython-setuptools-git-e814d51b89cdfb3cd5ec567726c5756f6872041e.tar.gz
Replace cluttered script generation with multiline strings
Diffstat (limited to 'setuptools/tests/test_egg_info.py')
-rw-r--r--setuptools/tests/test_egg_info.py28
1 files changed, 18 insertions, 10 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index d8c3252e..6d51955c 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -4,23 +4,31 @@ import shutil
import stat
from . import environment
+from .textwrap import DALS
class TestEggInfo:
+ setup_script = DALS("""
+ from setuptools import setup
+
+ setup(
+ name='foo',
+ py_modules=['hello'],
+ entry_points={'console_scripts': ['hi = hello.run']},
+ zip_safe=False,
+ )
+ """)
+
def _create_project(self):
with open('setup.py', 'w') as f:
- f.write('from setuptools import setup\n')
- f.write('\n')
- f.write('setup(\n')
- f.write(" name='foo',\n")
- f.write(" py_modules=['hello'],\n")
- f.write(" entry_points={'console_scripts': ['hi = hello.run']},\n")
- f.write(' zip_safe=False,\n')
- f.write(' )\n')
+ f.write(self.setup_script)
+
with open('hello.py', 'w') as f:
- f.write('def run():\n')
- f.write(" print('hello')\n")
+ f.write(DALS("""
+ def run():
+ print('hello')
+ """))
def test_egg_base_installed_egg_info(self, tmpdir_cwd):
self._create_project()