-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Stubbed sphinx-extension with tests
- Loading branch information
Showing
5 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
"""Implementation as Sphinx-extension.""" | ||
|
||
from sphinx.application import Sphinx | ||
|
||
from . import __version__ | ||
|
||
|
||
def setup(app: Sphinx): # noqa: D103 | ||
return { | ||
"version": __version__, | ||
"env_version": 1, | ||
"parallel_read_safe": True, | ||
"parallel_write_safe": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Configuration for pytest.""" | ||
|
||
import pytest | ||
from sphinx.testing.path import path | ||
|
||
pytest_plugins = "sphinx.testing.fixtures" | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def rootdir() -> path: # noqa: D103 | ||
return (path(__file__).parent / "doc-targets").abspath() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# noqa: D100 | ||
|
||
extensions = [ | ||
"rst_budoux.sphinx", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Test doc for rst-budoux | ||
======================= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Standard tests as Sphinx-extension.""" | ||
|
||
import pytest | ||
from sphinx.testing.util import SphinxTestApp | ||
|
||
|
||
@pytest.mark.sphinx("html") | ||
def test__it(app: SphinxTestApp): | ||
"""Test that it passes with rst-budoux extension.""" | ||
app.build() |