summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-09-24 12:17:20 -0400
committerJason R. Coombs <jaraco@jaraco.com>2022-09-24 12:17:20 -0400
commit3f39e178279ca76f5d6090fb439000dcb3b4b2cd (patch)
tree090d80e898b0e5e4953092b9f834c46364ecf066
parentf545f29fe2981187b634cd25945601a4a7adb0fe (diff)
downloadpython-setuptools-git-3f39e178279ca76f5d6090fb439000dcb3b4b2cd.tar.gz
Restore metadata tests (not discovered due to class name).
-rw-r--r--distutils/tests/test_dist.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/distutils/tests/test_dist.py b/distutils/tests/test_dist.py
index ddfaf921..25056af5 100644
--- a/distutils/tests/test_dist.py
+++ b/distutils/tests/test_dist.py
@@ -271,7 +271,7 @@ class TestDistributionBehavior(
@pytest.mark.usefixtures('save_env')
@pytest.mark.usefixtures('save_argv')
-class MetadataTestCase(support.TempdirManager):
+class TestMetadata(support.TempdirManager):
def format_metadata(self, dist):
sio = io.StringIO()
dist.metadata.write_pkg_file(sio)
@@ -498,9 +498,10 @@ class MetadataTestCase(support.TempdirManager):
assert fancy_options[0] == ('a', 'b', 'c')
assert fancy_options[1] == (1, 2, 3)
- def test_show_help(self):
+ def test_show_help(self, request):
# smoke test, just makes sure some help is displayed
- self.addCleanup(log.set_threshold, log._global_log.threshold)
+ reset_log = functools.partial(log.set_threshold, log._global_log.threshold)
+ request.addfinalizer(reset_log)
dist = Distribution()
sys.argv = []
dist.help = 1