Spaces:
Sleeping
Sleeping
Download tests/test_sections.py from Max-imillian/PaperCast: direct link, hf CLI and curl.
- Browser
- Download file 362 Bytes
-
https://huggingface.co/spaces/Max-imillian/PaperCast/resolve/main/tests/test_sections.py
- Command line
-
hf download hf://spaces/Max-imillian/PaperCast/tests/test_sections.py
-
curl -L -o test_sections.py https://huggingface.co/spaces/Max-imillian/PaperCast/resolve/main/tests/test_sections.py
362 Bytes
| from src.sections import split_markdown_sections | |
| def test_split_sections(): | |
| markdown = """Opening text.\n\n# Introduction\nIntro content.\n\n## Method\nMethod content.""" | |
| sections = split_markdown_sections(markdown) | |
| assert [section.title for section in sections] == ["Document opening", "Introduction", "Method"] | |
| assert sections[-1].level == 2 | |