aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_resources.py
diff options
context:
space:
mode:
authorpje <none@none>2013-04-25 20:32:21 -0400
committerpje <none@none>2013-04-25 20:32:21 -0400
commit46d1c4ed7df5722771e382a55fb79d9f1d16e389 (patch)
treecb46ae83c4d07fde11ff8e27a838808223d0bcfc /setuptools/tests/test_resources.py
parent192602a4ec9bd661a3561800e3c278bcc1f8c5f0 (diff)
downloadexternal_python_setuptools-46d1c4ed7df5722771e382a55fb79d9f1d16e389.tar.gz
external_python_setuptools-46d1c4ed7df5722771e382a55fb79d9f1d16e389.tar.bz2
external_python_setuptools-46d1c4ed7df5722771e382a55fb79d9f1d16e389.zip
Fix spurious test breakage on 2.7
(grafted from aeb004b22c9472066322f4b0319588cddf63f699) --HG-- branch : setuptools-0.6 extra : source : aeb004b22c9472066322f4b0319588cddf63f699
Diffstat (limited to 'setuptools/tests/test_resources.py')
-rw-r--r--setuptools/tests/test_resources.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index 03e5d0f8..fdd405af 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -507,7 +507,7 @@ class ScriptHeaderTests(TestCase):
def test_get_script_header_jython_workaround(self):
platform = sys.platform
sys.platform = 'java1.5.0_13'
- stdout = sys.stdout
+ stdout, stderr = sys.stdout, sys.stderr
try:
# A mock sys.executable that uses a shebang line (this file)
exe = os.path.normpath(os.path.splitext(__file__)[0] + '.py')
@@ -517,17 +517,17 @@ 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)
self.assert_('Unable to adapt shebang line' in sys.stdout.getvalue())
finally:
sys.platform = platform
- sys.stdout = stdout
+ sys.stdout, sys.stderr = stdout, stderr