From 8203152d9de2ff260ae12a0ada1b393cc64fe10e Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 15 May 2025 14:16:54 +0200 Subject: [PATCH] Test "test_doc_examples.py" fixed to handle the new readme --- tests/test_doc_examples.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_doc_examples.py b/tests/test_doc_examples.py index 64d7362..9963d37 100644 --- a/tests/test_doc_examples.py +++ b/tests/test_doc_examples.py @@ -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():