launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32302
[Merge] ~jugmac00/launchpad:remove-doc-building-tests into launchpad:master
Jürgen Gmach has proposed merging ~jugmac00/launchpad:remove-doc-building-tests into launchpad:master.
Commit message:
Remove doc building test
Previously we built the docs inside our source tree, but meanwhile we
have moved the documentation to github.
This test does not make any more sense, and it even broke as we do not
have Sphinx in our list of dependency which this test required.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jugmac00/launchpad/+git/launchpad/+merge/482947
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:remove-doc-building-tests into launchpad:master.
diff --git a/lib/lp/scripts/tests/test_sphinxdocs.py b/lib/lp/scripts/tests/test_sphinxdocs.py
deleted file mode 100644
index f44425f..0000000
--- a/lib/lp/scripts/tests/test_sphinxdocs.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2011-2021 Canonical Ltd. This software is licensed under the
-# GNU Affero General Public License version 3 (see the file LICENSE).
-
-"""Tests for our Sphinx documentation."""
-
-import os
-
-from sphinx.cmd.build import main as sphinx_main
-from testtools.content import text_content
-
-from lp.services.config import config
-from lp.testing import TestCase
-from lp.testing.fixture import run_capturing_output
-
-
-class TestSphinxDocumentation(TestCase):
- """Is our Sphinx documentation building correctly?"""
-
- def test_docs_build_without_error(self):
- # The Sphinx documentation must build without errors or warnings.
- #
- # Note that the documents are built on devpad.canonical.com in a
- # cronscript that runs 'make -C doc html' in the Launchpad tree. This
- # test assumes that make command devolves into 'sphinx-build ...',
- # because running make commands from tests seems distasteful.
- output_dir = self.makeTemporaryDirectory()
- doc_dir = os.path.join(config.root, "doc")
- returncode, stdout, stderr = run_capturing_output(
- sphinx_main,
- [
- "-d",
- "%s/doctrees" % output_dir,
- "-aNqW",
- doc_dir,
- "%s/html" % output_dir,
- ],
- )
- self.addDetail("stdout", text_content(stdout))
- self.addDetail("stderr", text_content(stderr))
- self.assertEqual(0, returncode)