Skip to content

Commit ee00606

Browse files
committed
tests: Skip test_readme_examples if README.md is not present
This happens in wheel installs in Debian's `pybuild` environment.
1 parent cc201b2 commit ee00606

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_readme_examples.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
def readme_blocks():
2323
"""Extract Python code blocks from README.md"""
2424
readme_path = Path(__file__).parent.parent / "README.md"
25+
if not readme_path.exists():
26+
pytest.skip(f"README.md not found at {readme_path}")
2527
return re.findall(r"```python\n(.*?)\n```", readme_path.read_text(), re.DOTALL)
2628

2729

0 commit comments

Comments
 (0)