summaryrefslogtreecommitdiff
path: root/Lib/test/test_logging.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2017-01-11 17:35:36 +0000
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2017-01-11 17:35:36 +0000
commit924aaae4c2a99015ca6b448f16eed31bbb598b98 (patch)
treefd60c3aefa82b95cec40429bbd975348b82b6669 /Lib/test/test_logging.py
parent9da31f7274472903a32407a4e8227d1f295672a6 (diff)
downloadcpython-git-924aaae4c2a99015ca6b448f16eed31bbb598b98.tar.gz
Issue #29220: Improved fix and test.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r--Lib/test/test_logging.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 0e70ccd5f0..1c850456b1 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -308,6 +308,14 @@ class BuiltinLevelsTest(BaseTest):
self.assertEqual(logging.getLevelName('INFO'), logging.INFO)
self.assertEqual(logging.getLevelName(logging.INFO), 'INFO')
+ def test_regression_29220(self):
+ """See issue #29220 for more information."""
+ logging.addLevelName(logging.INFO, '')
+ self.addCleanup(logging.addLevelName, logging.INFO, 'INFO')
+ self.assertEqual(logging.getLevelName(logging.INFO), '')
+ self.assertEqual(logging.getLevelName(logging.NOTSET), 'NOTSET')
+ self.assertEqual(logging.getLevelName('NOTSET'), logging.NOTSET)
+
class BasicFilterTest(BaseTest):
"""Test the bundled Filter class."""