Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a9c227

Browse files
authored
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
1 parent 8a80895 commit 2a9c227

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/unittest.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,8 @@ Test cases
11501150
Example::
11511151

11521152
with self.assertLogs('foo', level='INFO') as cm:
1153-
logging.getLogger('foo').info('first message')
1154-
logging.getLogger('foo.bar').error('second message')
1153+
logging.getLogger('foo').info('first message')
1154+
logging.getLogger('foo.bar').error('second message')
11551155
self.assertEqual(cm.output, ['INFO:foo:first message',
11561156
'ERROR:foo.bar:second message'])
11571157

0 commit comments

Comments
 (0)