mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
added test for show_missing_items True
This commit is contained in:
parent
d83f34794c
commit
42b755db2e
@ -28,6 +28,8 @@ def test_build(app, status, warning):
|
|||||||
|
|
||||||
assert ' * mod -- No module named mod' # in the "failed import" section
|
assert ' * mod -- No module named mod' # in the "failed import" section
|
||||||
|
|
||||||
|
assert "undocumented py" not in status.getvalue()
|
||||||
|
|
||||||
c_undoc = (app.outdir / 'c.txt').read_text()
|
c_undoc = (app.outdir / 'c.txt').read_text()
|
||||||
assert c_undoc.startswith('Undocumented C API elements\n'
|
assert c_undoc.startswith('Undocumented C API elements\n'
|
||||||
'===========================\n')
|
'===========================\n')
|
||||||
@ -46,6 +48,8 @@ def test_build(app, status, warning):
|
|||||||
assert 'Class' in undoc_py['autodoc_target']['classes']
|
assert 'Class' in undoc_py['autodoc_target']['classes']
|
||||||
assert 'undocmeth' in undoc_py['autodoc_target']['classes']['Class']
|
assert 'undocmeth' in undoc_py['autodoc_target']['classes']['Class']
|
||||||
|
|
||||||
|
assert "undocumented c" not in status.getvalue()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('coverage', testroot='ext-coverage')
|
@pytest.mark.sphinx('coverage', testroot='ext-coverage')
|
||||||
def test_coverage_ignore_pyobjects(app, status, warning):
|
def test_coverage_ignore_pyobjects(app, status, warning):
|
||||||
@ -64,3 +68,16 @@ Classes:
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
assert actual == expected
|
assert actual == expected
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.sphinx('coverage', confoverrides={'coverage_show_missing_items': True})
|
||||||
|
def test_show_missing_items(app, status, warning):
|
||||||
|
app.builder.build_all()
|
||||||
|
|
||||||
|
assert "undocumented" in status.getvalue()
|
||||||
|
|
||||||
|
assert "py function raises" in status.getvalue()
|
||||||
|
assert "py class Base" in status.getvalue()
|
||||||
|
assert "py method Class.roger" in status.getvalue()
|
||||||
|
|
||||||
|
assert "c api Py_SphinxTest [ function]" in status.getvalue()
|
||||||
|
Loading…
Reference in New Issue
Block a user