diff options
author | tarek <none@none> | 2009-09-20 14:48:47 +0200 |
---|---|---|
committer | tarek <none@none> | 2009-09-20 14:48:47 +0200 |
commit | ba84419dfc63e5f535faead38ee9fb60306a079c (patch) | |
tree | c489fe218f0e43d14f3a9e8f8c14517439d4fde0 /setuptools/tests | |
parent | 1219c326683905695fbdf60c22367129075d2f8d (diff) | |
parent | 95159c09e5bb2d1dc1f0ccf89ccbe90ecc6871a0 (diff) | |
download | external_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.tar.gz external_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.tar.bz2 external_python_setuptools-ba84419dfc63e5f535faead38ee9fb60306a079c.zip |
merge dance
--HG--
branch : distribute
extra : rebase_source : e0fc1e252a506a6a751f9557d4a01580e1cbbdfa
Diffstat (limited to 'setuptools/tests')
-rw-r--r-- | setuptools/tests/doctest.py | 8 | ||||
-rw-r--r-- | setuptools/tests/test_resources.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/setuptools/tests/doctest.py b/setuptools/tests/doctest.py index bffce58f..be399a9d 100644 --- a/setuptools/tests/doctest.py +++ b/setuptools/tests/doctest.py @@ -2053,16 +2053,16 @@ class Tester: return (f,t) def rundict(self, d, name, module=None): - import new - m = new.module(name) + import types + m = types.ModuleType(name) m.__dict__.update(d) if module is None: module = False return self.rundoc(m, name, module) def run__test__(self, d, name): - import new - m = new.module(name) + import types + m = types.ModuleType(name) m.__test__ = d return self.rundoc(m, name) diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 03e5d0f8..8f100419 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -517,12 +517,12 @@ class ScriptHeaderTests(TestCase): # Ensure we generate what is basically a broken shebang line # when there's options, with a warning emitted - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python -x', executable=exe), '#!%s -x\n' % exe) self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue()) - sys.stdout = StringIO.StringIO() + sys.stdout = sys.stderr = StringIO.StringIO() self.assertEqual(get_script_header('#!/usr/bin/python', executable=self.non_ascii_exe), '#!%s -x\n' % self.non_ascii_exe) |