diff options
author | Julien Danjou <julien@danjou.info> | 2015-05-05 14:21:56 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2015-05-21 15:00:47 -0700 |
commit | e943f760851d193cc4d808deeef59d1a5f789c03 (patch) | |
tree | 9605bb4dfefce608319348302eda4926a80cbc7f /pbr/tests/test_setup.py | |
parent | 3cec7c8782d8ccecdf8c3e08b21d9d9342b096da (diff) | |
download | pbr-e943f760851d193cc4d808deeef59d1a5f789c03.tar.gz |
builddoc: allow to use fnmatch-style exclusion for autodoc
This allows to use patterns such as heat.tests.* to exlude modules from
autodoc genereation.
Change-Id: Ibfc4161670fd9344da88c4a85a3aea992fcdf519
Diffstat (limited to 'pbr/tests/test_setup.py')
-rw-r--r-- | pbr/tests/test_setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pbr/tests/test_setup.py b/pbr/tests/test_setup.py index 252658c..3aec296 100644 --- a/pbr/tests/test_setup.py +++ b/pbr/tests/test_setup.py @@ -195,6 +195,7 @@ class BuildSphinxTest(base.BaseTestCase): ('true_autodoc_caps_with_excludes', dict(has_opt=True, autodoc='True', has_autodoc=True, excludes="fake_package.fake_private_module\n" + "fake_package.another_fake_*\n" "fake_package.unknown_module")), ('true_autodoc_lower', dict(has_opt=True, autodoc='true', has_autodoc=True)), @@ -216,6 +217,7 @@ class BuildSphinxTest(base.BaseTestCase): "source_dir": ["a", "."]} pkg_fixture = fixtures.PythonPackage( "fake_package", [("fake_module.py", b""), + ("another_fake_module_for_testing.py", b""), ("fake_private_module.py", b"")]) self.useFixture(pkg_fixture) self.useFixture(base.DiveDir(pkg_fixture.base)) @@ -224,6 +226,7 @@ class BuildSphinxTest(base.BaseTestCase): self.distr.command_options["pbr"]["autodoc_exclude_modules"] = ( 'setup.cfg', "fake_package.fake_private_module\n" + "fake_package.another_fake_*\n" "fake_package.unknown_module") if self.has_opt: options = self.distr.command_options["pbr"] @@ -245,6 +248,9 @@ class BuildSphinxTest(base.BaseTestCase): assertion( os.path.exists( "api/fake_package.fake_private_module.rst")) + assertion( + os.path.exists( + "api/fake_package.another_fake_module_for_testing.rst")) def test_builders_config(self): build_doc = packaging.LocalBuildDoc(self.distr) |