summaryrefslogtreecommitdiff
path: root/tests/test_ext_apidoc.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-01-26 02:13:21 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-01-30 23:17:59 +0900
commit09cf37eebec88ed3c81e78b25138a870eae85d31 (patch)
tree631ceaf841727d8a19f78b45f467719f04d3196c /tests/test_ext_apidoc.py
parent0cc625a82c029d59a443f17df9fa31eaf83bf336 (diff)
downloadsphinx-git-09cf37eebec88ed3c81e78b25138a870eae85d31.tar.gz
Fix #6899: apidoc: private members are not shown even if --private given
Diffstat (limited to 'tests/test_ext_apidoc.py')
-rw-r--r--tests/test_ext_apidoc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_ext_apidoc.py b/tests/test_ext_apidoc.py
index 767aa047e..3033cb450 100644
--- a/tests/test_ext_apidoc.py
+++ b/tests/test_ext_apidoc.py
@@ -408,11 +408,13 @@ def test_private(tempdir):
# without --private option
apidoc_main(['-o', tempdir, tempdir])
assert (tempdir / 'hello.rst').exists()
+ assert ':private-members:' not in (tempdir / 'hello.rst').text()
assert not (tempdir / '_world.rst').exists()
# with --private option
- apidoc_main(['--private', '-o', tempdir, tempdir])
+ apidoc_main(['--private', '-f', '-o', tempdir, tempdir])
assert (tempdir / 'hello.rst').exists()
+ assert ':private-members:' in (tempdir / 'hello.rst').text()
assert (tempdir / '_world.rst').exists()