Closes #27935: returned numeric value for 'FATAL' logging level.

This commit is contained in:
Vinay Sajip 2016-09-03 17:04:36 +01:00
parent 44ac3c5fe9
commit 2500c98278
2 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,7 @@ _levelToName = {
}
_nameToLevel = {
'CRITICAL': CRITICAL,
'FATAL': FATAL,
'ERROR': ERROR,
'WARN': WARNING,
'WARNING': WARNING,

View File

@ -309,6 +309,10 @@ 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)
class BasicFilterTest(BaseTest):
"""Test the bundled Filter class."""