diff options
author | Cielquan <cielquan@protonmail.com> | 2020-05-31 18:38:21 +0200 |
---|---|---|
committer | Cielquan <cielquan@protonmail.com> | 2020-05-31 18:38:21 +0200 |
commit | 42b755db2e8e2d6f0540e7208d190302f3ac611d (patch) | |
tree | fe4833235c0fd8e9871182bfc34ccbf9c8e7b916 /tests/test_ext_coverage.py | |
parent | d83f34794cdcb8b07d3f67e2ee7acf8f15295cf4 (diff) | |
download | sphinx-git-42b755db2e8e2d6f0540e7208d190302f3ac611d.tar.gz |
added test for show_missing_items True
Diffstat (limited to 'tests/test_ext_coverage.py')
-rw-r--r-- | tests/test_ext_coverage.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_ext_coverage.py b/tests/test_ext_coverage.py index 16f53112b..1ac828dc5 100644 --- a/tests/test_ext_coverage.py +++ b/tests/test_ext_coverage.py @@ -28,6 +28,8 @@ def test_build(app, status, warning): 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() assert c_undoc.startswith('Undocumented C API elements\n' '===========================\n') @@ -46,6 +48,8 @@ def test_build(app, status, warning): assert 'Class' in undoc_py['autodoc_target']['classes'] assert 'undocmeth' in undoc_py['autodoc_target']['classes']['Class'] + assert "undocumented c" not in status.getvalue() + @pytest.mark.sphinx('coverage', testroot='ext-coverage') def test_coverage_ignore_pyobjects(app, status, warning): @@ -64,3 +68,16 @@ Classes: ''' 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() |