summaryrefslogtreecommitdiff
path: root/tests/test_ext_autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ext_autodoc.py')
-rw-r--r--tests/test_ext_autodoc.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py
index 30efca9f1..4ac9381ae 100644
--- a/tests/test_ext_autodoc.py
+++ b/tests/test_ext_autodoc.py
@@ -2235,3 +2235,49 @@ def test_name_mangling(app):
' name of Foo',
'',
]
+
+
+@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')
+@pytest.mark.sphinx('html', testroot='ext-autodoc')
+def test_hide_value(app):
+ options = {'members': True}
+ actual = do_autodoc(app, 'module', 'target.hide_value', options)
+ assert list(actual) == [
+ '',
+ '.. py:module:: target.hide_value',
+ '',
+ '',
+ '.. py:class:: Foo()',
+ ' :module: target.hide_value',
+ '',
+ ' docstring',
+ '',
+ '',
+ ' .. py:attribute:: Foo.SENTINEL1',
+ ' :module: target.hide_value',
+ '',
+ ' docstring',
+ '',
+ ' :meta hide-value:',
+ '',
+ '',
+ ' .. py:attribute:: Foo.SENTINEL2',
+ ' :module: target.hide_value',
+ '',
+ ' :meta hide-value:',
+ '',
+ '',
+ '.. py:data:: SENTINEL1',
+ ' :module: target.hide_value',
+ '',
+ ' docstring',
+ '',
+ ' :meta hide-value:',
+ '',
+ '',
+ '.. py:data:: SENTINEL2',
+ ' :module: target.hide_value',
+ '',
+ ' :meta hide-value:',
+ '',
+ ]