]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
authorAlexandru Mărășteanu <alexei@users.noreply.github.com>
Fri, 22 Jul 2022 16:37:22 +0000 (19:37 +0300)
committerGitHub <noreply@github.com>
Fri, 22 Jul 2022 16:37:22 +0000 (11:37 -0500)
Doc/library/unittest.rst

index 331f67cba23b5f52f95d8b8e08346fe0e1ca237a..38be6b82b492d42c5cdfb97b5a18b01f39cf37a6 100644 (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'])