31 lines
698 B
Python
31 lines
698 B
Python
|
|
import pytest
|
|
|
|
pytestmark = pytest.mark.pytest
|
|
|
|
from byteb4rb1e.sphinxcontrib.testing.pytest.fixtures import (
|
|
mock_sphinx_testapp,
|
|
mock_sphinx_testsrc_dir
|
|
)
|
|
|
|
|
|
def test_mock_sphinx_testsrc_dir(mock_sphinx_testsrc_dir):
|
|
"""
|
|
"""
|
|
srcdir = mock_sphinx_testsrc_dir()
|
|
|
|
assert (srcdir / 'conf.py').exists()
|
|
assert (srcdir / 'index.rst').exists()
|
|
|
|
|
|
def test_mock_sphinx_testapp(mock_sphinx_testapp, mock_sphinx_testsrc_dir):
|
|
"""
|
|
"""
|
|
srcdir = mock_sphinx_testsrc_dir()
|
|
|
|
app = mock_sphinx_testapp(srcdir=srcdir)
|
|
|
|
assert app.builder is not None
|
|
assert app.srcdir.samefile(srcdir) is False # Should be copied to internal src
|
|
|
|
app.build(force_all=True)
|