-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8595 from tk0miya/8594_empty_all
Fix #8594: autodoc: empty __all__ attribute is ignored
- Loading branch information
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
docsting of empty_all module. | ||
""" | ||
__all__ = [] | ||
|
||
|
||
def foo(): | ||
"""docstring""" | ||
|
||
|
||
def bar(): | ||
"""docstring""" | ||
|
||
|
||
def baz(): | ||
"""docstring""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
test_ext_autodoc_autocmodule | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Test the autodoc extension. This tests mainly the Documenters; the auto | ||
directives are tested in a test source file translated by test_build. | ||
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. | ||
:license: BSD, see LICENSE for details. | ||
""" | ||
|
||
import pytest | ||
|
||
from .test_ext_autodoc import do_autodoc | ||
|
||
|
||
@pytest.mark.sphinx('html', testroot='ext-autodoc') | ||
def test_empty_all(app): | ||
options = {'members': True} | ||
actual = do_autodoc(app, 'module', 'target.empty_all', options) | ||
assert list(actual) == [ | ||
'', | ||
'.. py:module:: target.empty_all', | ||
'', | ||
'docsting of empty_all module.', | ||
'', | ||
] |