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:58 -07:00 committed by GitHub
parent 02f1cac282
commit e50a63ed18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1122,8 +1122,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'])