diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-06 21:30:56 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-06 22:22:01 +0900 |
commit | 35e1764025447b8e863a68c65a666836b5099a9d (patch) | |
tree | b4c06dd45760235a0049cb7bf90c1847175576d8 /tests/test_autodoc.py | |
parent | 4abc55239a5ecd52c249bf0ede0fea44504b1fc8 (diff) | |
download | sphinx-git-35e1764025447b8e863a68c65a666836b5099a9d.tar.gz |
Fix #5290: autodoc: failed to analyze source code in egg package
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index cefceb833..e2dc37c56 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1584,3 +1584,26 @@ def test_autodoc_default_options_with_values(app): assert ' list of weak references to the object (if defined)' not in actual assert ' .. py:method:: CustomIter.snafucate()' not in actual assert ' Makes this snafucated.' not in actual + + +@pytest.mark.sphinx('html', testroot='pycode-egg') +def test_autodoc_for_egged_code(app): + options = {"members": None, + "undoc-members": None} + actual = do_autodoc(app, 'module', 'sample', options) + assert list(actual) == [ + '', + '.. py:module:: sample', + '', + '', + '.. py:data:: CONSTANT', + ' :module: sample', + ' :annotation: = 1', + '', + ' constant on sample.py', + ' ', + '', + '.. py:function:: hello(s)', + ' :module: sample', + '' + ] |