diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Lib/test/test_logging.py | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 9dedc098ba..9f482e1b30 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -309,6 +309,12 @@ 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), '') + def test_issue27935(self): fatal = logging.getLevelName('FATAL') self.assertEqual(fatal, logging.FATAL) @@ -3519,6 +3525,11 @@ class ModuleLevelMiscTest(BaseTest): logging.disable(83) self.assertEqual(logging.root.manager.disable, 83) + # test the default value introduced in 3.7 + # (Issue #28524) + logging.disable() + self.assertEqual(logging.root.manager.disable, logging.CRITICAL) + def _test_log(self, method, level=None): called = [] support.patch(self, logging, 'basicConfig', |