From: Vinay Sajip Date: Wed, 11 Jan 2017 17:41:28 +0000 (+0000) Subject: Issue #292Merged fixes from 3.5. X-Git-Tag: v3.6.1rc1~182 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a861d48817e2477cd0b5189787d071ff01dbe4f7;p=thirdparty%2FPython%2Fcpython.git Issue #292Merged fixes from 3.5. --- a861d48817e2477cd0b5189787d071ff01dbe4f7 diff --cc Lib/test/test_logging.py index 079f58482a0a,1c850456b14d..9dedc098ba5a --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@@ -309,10 -308,14 +309,18 @@@ class BuiltinLevelsTest(BaseTest) self.assertEqual(logging.getLevelName('INFO'), logging.INFO) self.assertEqual(logging.getLevelName(logging.INFO), 'INFO') + def test_issue27935(self): + fatal = logging.getLevelName('FATAL') + self.assertEqual(fatal, logging.FATAL) + + 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."""