summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging/tests')
-rw-r--r--Lib/packaging/tests/test_command_check.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_command_check.py b/Lib/packaging/tests/test_command_check.py
index 0bdd616..271e457 100644
--- a/Lib/packaging/tests/test_command_check.py
+++ b/Lib/packaging/tests/test_command_check.py
@@ -124,6 +124,17 @@ class CheckTestCase(support.LoggingCatcher,
cmd.check_hooks_resolvable()
self.assertEqual(len(self.get_logs(logging.WARNING)), 1)
+ def test_warn(self):
+ _, dist = self.create_dist()
+ cmd = check(dist)
+ self.assertEqual([], self.get_logs())
+ cmd.warn('hello')
+ self.assertEqual(['check: hello'], self.get_logs())
+ cmd.warn('hello %s', 'world')
+ self.assertEqual(['check: hello world'], self.get_logs())
+ cmd.warn('hello %s %s', 'beautiful', 'world')
+ self.assertEqual(['check: hello beautiful world'], self.get_logs())
+
def test_suite():
return unittest.makeSuite(CheckTestCase)