diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-05-03 22:59:49 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-05-30 01:12:23 +0900 |
commit | be6f4fd8f6944ff5a3e2150d0b70a080d380b99e (patch) | |
tree | f76a25d3ee44a639d5d0b9b82bcbde978d600e6c /tests/test_ext_apidoc.py | |
parent | 38aacdffdb2acc6a0004c2c365ee08c0cc264b56 (diff) | |
download | sphinx-git-be6f4fd8f6944ff5a3e2150d0b70a080d380b99e.tar.gz |
refactor apidoc: Add is_skipped_module()
Diffstat (limited to 'tests/test_ext_apidoc.py')
-rw-r--r-- | tests/test_ext_apidoc.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_ext_apidoc.py b/tests/test_ext_apidoc.py index 9fefb4ce9..c6cf43c7e 100644 --- a/tests/test_ext_apidoc.py +++ b/tests/test_ext_apidoc.py @@ -401,6 +401,21 @@ def test_subpackage_in_toc(make_app, apidoc): assert (outdir / 'parent.child.foo.rst').isfile() +def test_private(tempdir): + (tempdir / 'hello.py').write_text('') + (tempdir / '_world.py').write_text('') + + # without --private option + apidoc_main(['-o', tempdir, tempdir]) + assert (tempdir / 'hello.rst').exists() + assert not (tempdir / '_world.rst').exists() + + # with --private option + apidoc_main(['--private', '-o', tempdir, tempdir]) + assert (tempdir / 'hello.rst').exists() + assert (tempdir / '_world.rst').exists() + + def test_toc_file(tempdir): outdir = path(tempdir) (outdir / 'module').makedirs() |