Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)

This commit is contained in:
Alexandru Mărășteanu 2022-07-22 19:37:22 +03:00 committed by GitHub
parent 8a808952a6
commit 2a9c227ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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'])