summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_bdist.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging/tests/test_command_bdist.py')
-rw-r--r--Lib/packaging/tests/test_command_bdist.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/packaging/tests/test_command_bdist.py b/Lib/packaging/tests/test_command_bdist.py
index dd10188..7b2ea01 100644
--- a/Lib/packaging/tests/test_command_bdist.py
+++ b/Lib/packaging/tests/test_command_bdist.py
@@ -1,7 +1,8 @@
"""Tests for distutils.command.bdist."""
import os
+from test.support import captured_stdout
from packaging.command.bdist import bdist, show_formats
-from packaging.tests import unittest, support, captured_stdout
+from packaging.tests import unittest, support
class BuildTestCase(support.TempdirManager,
@@ -42,7 +43,9 @@ class BuildTestCase(support.TempdirManager,
'%s should take --skip-build from bdist' % name)
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(bdist.format_commands)