Test "test_doc_examples.py" fixed to handle the new readme

This commit is contained in:
Nicolas 2025-05-15 14:16:54 +02:00
parent c76bd63ad4
commit 8203152d9d
1 changed files with 2 additions and 1 deletions

View File

@ -38,12 +38,13 @@ def markdown_to_code(lines: list[str], language: str = "python") -> Generator[st
yield f' print(({ret_block_flag}).__repr__().strip())'
elif ret_block_flag:
yield ' ref_str = """'
yield ' ref_str = r"""'
yield from [str(line) for line in block.splitlines()]
yield '"""'
yield f' print("-- Reference (({ret_block_flag})):")'
yield ' print(ref_str.strip())'
yield f' assert ({ret_block_flag}).__repr__().strip() == ref_str.strip()'
ret_block_flag = False
def test_readme():