summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2014-09-17 15:08:29 +0200
committerJulien Danjou <julien@danjou.info>2014-09-17 16:21:54 +0200
commit883c865908153917d5fd10635a75e7f032186c00 (patch)
tree94d05f215addc6cae4381ea5a9b7035fb852a0bc
parent5ac3783712938b17977c50d1fca0b7c1ccbd9710 (diff)
downloadpbr-883c865908153917d5fd10635a75e7f032186c00.tar.gz
tests: factorize has_opt handling
Change-Id: I7d5551af250c1e24177e0e7eed0bd622bb06ca29
-rw-r--r--pbr/tests/test_setup.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/pbr/tests/test_setup.py b/pbr/tests/test_setup.py
index 44436df..8310e14 100644
--- a/pbr/tests/test_setup.py
+++ b/pbr/tests/test_setup.py
@@ -214,11 +214,11 @@ class BuildSphinxTest(base.BaseTestCase):
"fake_package", [("fake_module.py", b"")])
self.useFixture(pkg_fixture)
self.useFixture(base.DiveDir(pkg_fixture.base))
-
- def test_build_doc(self):
if self.has_opt:
self.distr.command_options["pbr"] = {
"autodoc_index_modules": ('setup.cfg', self.autodoc)}
+
+ def test_build_doc(self):
build_doc = packaging.LocalBuildDoc(self.distr)
build_doc.run()
@@ -229,10 +229,6 @@ class BuildSphinxTest(base.BaseTestCase):
"api/fake_package.fake_module.rst") == self.has_autodoc)
def test_builders_config(self):
- if self.has_opt:
- self.distr.command_options["pbr"] = {
- "autodoc_index_modules": ('setup.cfg', self.autodoc)}
-
build_doc = packaging.LocalBuildDoc(self.distr)
build_doc.finalize_options()