-
Notifications
You must be signed in to change notification settings - Fork 1
Test Python docstring in markdown files #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import pytest | ||
|
|
||
| from fio_planet import snuggs | ||
|
|
||
|
|
||
| @pytest.fixture(autouse=True) | ||
| def add_snuggs(doctest_namespace): | ||
| doctest_namespace["snuggs"] = snuggs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,6 +68,9 @@ nav: | |
| - "Topics": 'topics' | ||
|
|
||
| markdown_extensions: | ||
| - pymdownx.inlinehilite | ||
| - pymdownx.snippets: | ||
| dedent_subsections: True | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Extension configuration here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, maybe this is what I'm missing! I'll have to give this a shot. |
||
| - pymdownx.highlight | ||
| - pymdownx.superfences | ||
| - mkdocs-click | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,16 +25,18 @@ def test_map_count(): | |
| with open("tests/data/trio.seq") as seq: | ||
| data = seq.read() | ||
|
|
||
| # --8<-- [start:map] | ||
| runner = CliRunner() | ||
| result = runner.invoke( | ||
| main_group, | ||
| ["map", "centroid (buffer g 1.0)"], | ||
| input=data, | ||
| input=data, foo=42, | ||
| ) | ||
| # --8<-- [end:map] | ||
|
||
|
|
||
| assert result.exit_code == 0 | ||
| assert result.output.count('"type": "Point"') == 3 | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("raw_opt", ["--raw", "-r"]) | ||
| def test_reduce_area(raw_opt): | ||
| """Reduce features to their (raw) area.""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinlacaille here's my first snippet test!