mirror of https://github.com/python/cpython
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
This commit is contained in:
parent
8a808952a6
commit
2a9c227ac1
|
@ -1150,8 +1150,8 @@ Test cases
|
|||
Example::
|
||||
|
||||
with self.assertLogs('foo', level='INFO') as cm:
|
||||
logging.getLogger('foo').info('first message')
|
||||
logging.getLogger('foo.bar').error('second message')
|
||||
logging.getLogger('foo').info('first message')
|
||||
logging.getLogger('foo.bar').error('second message')
|
||||
self.assertEqual(cm.output, ['INFO:foo:first message',
|
||||
'ERROR:foo.bar:second message'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue