Close #6798: autosummary: emit `autodoc-skip-member` event on generating stub file

This commit is contained in:
Takeshi KOMIYA
2019-11-14 02:23:06 +09:00
parent ef09ea23fe
commit 66c3dd3adb
7 changed files with 64 additions and 2 deletions

View File

@@ -36,6 +36,11 @@ default_kw = {
}
@pytest.fixture(scope='function', autouse=True)
def unload_target_module():
sys.modules.pop('target', None)
def test_mangle_signature():
TEST = """
() :: ()
@@ -304,6 +309,14 @@ def test_generate_autosummary_docs_property(app):
".. autoproperty:: Base.prop")
@pytest.mark.sphinx(testroot='ext-autosummary-skip-member')
def test_autosummary_skip_member(app):
app.build()
content = (app.srcdir / 'generate' / 'target.Foo.rst').text()
assert 'Foo.skipmeth' not in content
@pytest.mark.sphinx('dummy', testroot='ext-autosummary',
confoverrides={'autosummary_generate': []})
def test_empty_autosummary_generate(app, status, warning):