31 lines
685 B
Python
31 lines
685 B
Python
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from byteb4rb1e.sphinxcontrib.testing.pytest.fixtures import (
|
|
mock_sphinx_testapp,
|
|
mock_sphinx_testsrc_dir
|
|
)
|
|
|
|
|
|
def test_default(
|
|
mock_sphinx_testapp,
|
|
mock_sphinx_testsrc_dir,
|
|
) -> None:
|
|
"""
|
|
"""
|
|
src_dir = mock_sphinx_testsrc_dir()
|
|
(src_dir / 'conf.py').write_text("""
|
|
project = "foobar"
|
|
master_doc = "index"
|
|
extensions = ["byteb4rb1e.sphinxcontrib.theme"]
|
|
html_theme = "web20"
|
|
""")
|
|
|
|
app = mock_sphinx_testapp(srcdir=src_dir)
|
|
|
|
app.build(force_all=True)
|
|
|
|
assert (Path(app.outdir) / '_static' / 'style' / 'theme.css').exists()
|
|
assert (Path(app.outdir) / '_static' / 'script' / 'theme.js').exists()
|
|
|