]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 22 Jul 2022 16:45:58 +0000 (09:45 -0700)
committerGitHub <noreply@github.com>
Fri, 22 Jul 2022 16:45:58 +0000 (09:45 -0700)
(cherry picked from commit 2a9c227ac11f7d8fc6d756542dd3410be0a6b6b0)

Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
Doc/library/unittest.rst

index 67fec60263a4c647501d218c8b72ba4a61c5cfc1..0c3fc31b93a9462c257336ad7ac1fade8e27d60d 100644 (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'])