From: Vinay Sajip Date: Sat, 3 Sep 2016 16:04:36 +0000 (+0100) Subject: Closes #27935: returned numeric value for 'FATAL' logging level. X-Git-Tag: v3.6.0b1~486 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2500c9827886fb1826317877aacaef023707349e;p=thirdparty%2FPython%2Fcpython.git Closes #27935: returned numeric value for 'FATAL' logging level. --- diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 0c5c2ec28f9e..2590d6528f66 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -108,6 +108,7 @@ _levelToName = { } _nameToLevel = { 'CRITICAL': CRITICAL, + 'FATAL': FATAL, 'ERROR': ERROR, 'WARN': WARNING, 'WARNING': WARNING, diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 7899c77fb969..ff0012beb20a 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -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."""