Issue #24678: Fixed raiseExceptions typo in logging tests.

Patch by Jacek Kołodziej.
This commit is contained in:
Serhiy Storchaka 2015-07-21 22:41:39 +03:00
commit 8ff3a5a9cd
1 changed files with 4 additions and 10 deletions

View File

@ -3779,18 +3779,12 @@ class LoggerTest(BaseTest):
(exc.__class__, exc, exc.__traceback__)) (exc.__class__, exc, exc.__traceback__))
def test_log_invalid_level_with_raise(self): def test_log_invalid_level_with_raise(self):
old_raise = logging.raiseExceptions with support.swap_attr(logging, 'raiseExceptions', True):
self.addCleanup(setattr, logging, 'raiseExecptions', old_raise) self.assertRaises(TypeError, self.logger.log, '10', 'test message')
logging.raiseExceptions = True
self.assertRaises(TypeError, self.logger.log, '10', 'test message')
def test_log_invalid_level_no_raise(self): def test_log_invalid_level_no_raise(self):
old_raise = logging.raiseExceptions with support.swap_attr(logging, 'raiseExceptions', False):
self.addCleanup(setattr, logging, 'raiseExecptions', old_raise) self.logger.log('10', 'test message') # no exception happens
logging.raiseExceptions = False
self.logger.log('10', 'test message') # no exception happens
def test_find_caller_with_stack_info(self): def test_find_caller_with_stack_info(self):
called = [] called = []