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

(cherry picked from commit 2a9c227ac1)

Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2022-07-22 09:45:20 -07:00 committed by GitHub
parent 12b56e4b78
commit 6a3b6c2cee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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