diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-01 17:14:19 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-01 17:14:19 -0500 |
commit | 32f39a11f9196984c50b2193ca40c2472040ed96 (patch) | |
tree | a820084ec942388ef0868cf2f6bcafb127681c78 | |
parent | 0bc8f31f5d694578cec3d0b8b4951db06fc921fb (diff) | |
download | external_python_setuptools-32f39a11f9196984c50b2193ca40c2472040ed96.tar.gz external_python_setuptools-32f39a11f9196984c50b2193ca40c2472040ed96.tar.bz2 external_python_setuptools-32f39a11f9196984c50b2193ca40c2472040ed96.zip |
Use quiet context instead of copy pasta.
-rw-r--r-- | setuptools/tests/test_bdist_egg.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/setuptools/tests/test_bdist_egg.py b/setuptools/tests/test_bdist_egg.py index 58d25b70..519f27c9 100644 --- a/setuptools/tests/test_bdist_egg.py +++ b/setuptools/tests/test_bdist_egg.py @@ -8,9 +8,11 @@ import sys import tempfile import unittest -from setuptools.compat import StringIO from setuptools.dist import Distribution +from . import contexts + + SETUP_PY = """\ from setuptools import setup @@ -50,13 +52,9 @@ class TestDevelopTest(unittest.TestCase): py_modules=['hi'] )) os.makedirs(os.path.join('build', 'src')) - old_stdout = sys.stdout - sys.stdout = StringIO() - try: + with contexts.quiet(): dist.parse_command_line() dist.run_commands() - finally: - sys.stdout = old_stdout # let's see if we got our egg link at the right place [content] = os.listdir('dist') |