Docs: Add offending code block to error message in docs tests (#6603)

This commit is contained in:
James Clarke 2023-12-13 15:40:26 +00:00 committed by GitHub
parent 27eeca7a02
commit b0d1618db4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -375,7 +375,8 @@ class TestDocSnippets(unittest.TestCase):
except Exception as ex:
raise AssertionError(
f'unable to parse {block.lang} code block in '
f'{block.filename}, around line {block.lineno}') from ex
f'{block.filename}, around line {block.lineno}: '
f'{code}') from ex
@unittest.skipIf(docutils is None, 'docutils is missing')
def test_cqa_doc_snippets(self):