diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:00:11 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-02 12:00:11 -0500 |
commit | a974f8c7b1b30bdb462531627a39255a0b82fdff (patch) | |
tree | 3f77de9e277f506ef6a4e2e6b4570f31d5811cec /setuptools/tests/test_test.py | |
parent | ee20548e4039df2a49157f5d85090286434ced5f (diff) | |
download | external_python_setuptools-a974f8c7b1b30bdb462531627a39255a0b82fdff.tar.gz external_python_setuptools-a974f8c7b1b30bdb462531627a39255a0b82fdff.tar.bz2 external_python_setuptools-a974f8c7b1b30bdb462531627a39255a0b82fdff.zip |
Use DALS for nicer indentation
Diffstat (limited to 'setuptools/tests/test_test.py')
-rw-r--r-- | setuptools/tests/test_test.py | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/setuptools/tests/test_test.py b/setuptools/tests/test_test.py index edd1769a..9a8f9313 100644 --- a/setuptools/tests/test_test.py +++ b/setuptools/tests/test_test.py @@ -13,37 +13,43 @@ from setuptools.compat import StringIO, PY2 from setuptools.command.test import test from setuptools.dist import Distribution -SETUP_PY = """\ -from setuptools import setup - -setup(name='foo', - packages=['name', 'name.space', 'name.space.tests'], - namespace_packages=['name'], - test_suite='name.space.tests.test_suite', -) -""" +from .textwrap import DALS + +SETUP_PY = DALS(""" + from setuptools import setup + + setup(name='foo', + packages=['name', 'name.space', 'name.space.tests'], + namespace_packages=['name'], + test_suite='name.space.tests.test_suite', + ) + """) + +NS_INIT = DALS(""" + # -*- coding: Latin-1 -*- + # Söme Arbiträry Ünicode to test Issüé 310 + try: + __import__('pkg_resources').declare_namespace(__name__) + except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) + """) -NS_INIT = """# -*- coding: Latin-1 -*- -# Söme Arbiträry Ünicode to test Issüé 310 -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - from pkgutil import extend_path - __path__ = extend_path(__path__, __name__) -""" # Make sure this is Latin-1 binary, before writing: if PY2: NS_INIT = NS_INIT.decode('UTF-8') NS_INIT = NS_INIT.encode('Latin-1') -TEST_PY = """import unittest +TEST_PY = DALS(""" + import unittest -class TestTest(unittest.TestCase): - def test_test(self): - print "Foo" # Should fail under Python 3 unless 2to3 is used + class TestTest(unittest.TestCase): + def test_test(self): + print "Foo" # Should fail under Python 3 unless 2to3 is used + + test_suite = unittest.makeSuite(TestTest) + """) -test_suite = unittest.makeSuite(TestTest) -""" class TestTestTest(unittest.TestCase): |