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

zware webhook-mailer at python.org
Fri Jul 22 12:37:32 EDT 2022


https://github.com/python/cpython/commit/2a9c227ac11f7d8fc6d756542dd3410be0a6b6b0
commit: 2a9c227ac11f7d8fc6d756542dd3410be0a6b6b0
branch: main
author: Alexandru Mărășteanu <alexei at users.noreply.github.com>
committer: zware <zachary.ware at gmail.com>
date: 2022-07-22T11:37:22-05:00
summary:

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

files:
M Doc/library/unittest.rst

diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 331f67cba23b5..38be6b82b492d 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -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'])
 



More information about the Python-checkins mailing list