summaryrefslogtreecommitdiff
path: root/tests/test_autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r--tests/test_autodoc.py23
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',
+ ''
+ ]