Commit f52d063a authored by Jason R. Coombs's avatar Jason R. Coombs

Re-save test modules with UTF-8 encoding

--HG--
branch : distribute
extra : rebase_source : 6728580b2f2f10026fe0f196db7ea5510acac704
extra : histedit_source : f4fbf02bbe3e4e39caf1aa2f5a354c99d9249e65
parent b827baba
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
"""develop tests """develop tests
""" """
...@@ -23,7 +23,7 @@ setup(name='foo', ...@@ -23,7 +23,7 @@ setup(name='foo',
) )
""" """
NS_INIT = """# -*- coding: Latin-1 -*- NS_INIT = """# -*- coding: Latin-1 -*-
# Söme Arbiträry Ünicode to test Issüé 310 # Söme Arbiträry Ünicode to test Issüé 310
try: try:
__import__('pkg_resources').declare_namespace(__name__) __import__('pkg_resources').declare_namespace(__name__)
...@@ -77,7 +77,7 @@ class TestTestTest(unittest.TestCase): ...@@ -77,7 +77,7 @@ class TestTestTest(unittest.TestCase):
f = open(init, 'wt') f = open(init, 'wt')
f.write(TEST_PY) f.write(TEST_PY)
f.close() f.close()
os.chdir(self.dir) os.chdir(self.dir)
self.old_base = site.USER_BASE self.old_base = site.USER_BASE
site.USER_BASE = tempfile.mkdtemp() site.USER_BASE = tempfile.mkdtemp()
...@@ -87,7 +87,7 @@ class TestTestTest(unittest.TestCase): ...@@ -87,7 +87,7 @@ class TestTestTest(unittest.TestCase):
def tearDown(self): def tearDown(self):
if sys.version < "2.6" or hasattr(sys, 'real_prefix'): if sys.version < "2.6" or hasattr(sys, 'real_prefix'):
return return
os.chdir(self.old_cwd) os.chdir(self.old_cwd)
shutil.rmtree(self.dir) shutil.rmtree(self.dir)
shutil.rmtree(site.USER_BASE) shutil.rmtree(site.USER_BASE)
...@@ -98,7 +98,7 @@ class TestTestTest(unittest.TestCase): ...@@ -98,7 +98,7 @@ class TestTestTest(unittest.TestCase):
def test_test(self): def test_test(self):
if sys.version < "2.6" or hasattr(sys, 'real_prefix'): if sys.version < "2.6" or hasattr(sys, 'real_prefix'):
return return
dist = Distribution(dict( dist = Distribution(dict(
name='foo', name='foo',
packages=['name', 'name.space', 'name.space.tests'], packages=['name', 'name.space', 'name.space.tests'],
...@@ -121,4 +121,4 @@ class TestTestTest(unittest.TestCase): ...@@ -121,4 +121,4 @@ class TestTestTest(unittest.TestCase):
pass pass
finally: finally:
sys.stdout = old_stdout sys.stdout = old_stdout
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