summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_sdist.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-15 09:48:36 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-15 09:48:36 (GMT)
commit9b5c7f44fad8fd78c23826218c6e7b425c06b183 (patch)
tree3ff3f2c379e4c0ceb8c2dba9aa1482a4c000e3fa /Lib/packaging/tests/test_command_sdist.py
parent36500344b293748177a0c6b5a0df187a15063d12 (diff)
downloadcpython-9b5c7f44fad8fd78c23826218c6e7b425c06b183.zip
cpython-9b5c7f44fad8fd78c23826218c6e7b425c06b183.tar.gz
cpython-9b5c7f44fad8fd78c23826218c6e7b425c06b183.tar.bz2
Remove unused code from packaging.tests.__init__
Diffstat (limited to 'Lib/packaging/tests/test_command_sdist.py')
-rw-r--r--Lib/packaging/tests/test_command_sdist.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/packaging/tests/test_command_sdist.py b/Lib/packaging/tests/test_command_sdist.py
index 0b9f5be..47c455e 100644
--- a/Lib/packaging/tests/test_command_sdist.py
+++ b/Lib/packaging/tests/test_command_sdist.py
@@ -17,8 +17,8 @@ from packaging.util import find_executable
from packaging.errors import PackagingOptionError
from packaging.command.sdist import sdist, show_formats
+from test.support import captured_stdout
from packaging.tests import support, unittest
-from packaging.tests import captured_stdout
from packaging.tests.support import requires_zlib
@@ -234,7 +234,9 @@ class SDistTestCase(support.TempdirManager,
self.assertIn("'setup.cfg' file not found", warnings[1])
def test_show_formats(self):
- __, stdout = captured_stdout(show_formats)
+ with captured_stdout() as stdout:
+ show_formats()
+ stdout = stdout.getvalue()
# the output should be a header line + one line per format
num_formats = len(get_archive_formats())