From 31e470ca11bcb692275cc5365653e8a07e1218c1 Mon Sep 17 00:00:00 2001 From: Alex Severin Date: Sun, 5 Jan 2025 12:42:35 +0300 Subject: [PATCH 1/3] assert readme is parsed in tests --- tests/test_readme.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_readme.py b/tests/test_readme.py index 2635e40..d6178c9 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -6,9 +6,9 @@ def test_readme() -> None: readme_path = Path("./README.md") - start_tag = "```python" - end_tag = "```" - scripts = parse_readme_code(readme_path, start_tag, end_tag) + scripts = parse_readme_code(readme_path, "```python", "```") + scripts += parse_readme_code(readme_path, "```py", "```") + assert len(scripts) > 0 for script in scripts: print("\n# executing the following script") print(script) From e0001b643ff960b7a5a985e7b31fbfa982316125 Mon Sep 17 00:00:00 2001 From: Alex Severin Date: Sun, 5 Jan 2025 12:49:30 +0300 Subject: [PATCH 2/3] dump test_readme.py --- tests/test_readme.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_readme.py b/tests/test_readme.py index d6178c9..64bd118 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -7,7 +7,6 @@ def test_readme() -> None: readme_path = Path("./README.md") scripts = parse_readme_code(readme_path, "```python", "```") - scripts += parse_readme_code(readme_path, "```py", "```") assert len(scripts) > 0 for script in scripts: print("\n# executing the following script") From 23ab48b592a87ba749481b13bf3f32b99d70f8b2 Mon Sep 17 00:00:00 2001 From: Alex Severin Date: Sun, 5 Jan 2025 12:52:17 +0300 Subject: [PATCH 3/3] refactor test_readme again --- tests/test_readme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_readme.py b/tests/test_readme.py index 64bd118..4acce98 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -6,7 +6,8 @@ def test_readme() -> None: readme_path = Path("./README.md") - scripts = parse_readme_code(readme_path, "```python", "```") + scripts = parse_readme_code(readme_path, "```python\n", "```\n") + scripts += parse_readme_code(readme_path, "```py\n", "```\n") assert len(scripts) > 0 for script in scripts: print("\n# executing the following script")