Skip to content
Snippets Groups Projects
Commit 1315b792 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

docs unittest: Split into two separate test cases


The RAPI and hooks documentation aren't related at all.

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent bf317058
No related branches found
No related tags found
No related merge requests found
...@@ -43,11 +43,8 @@ def _ReadDocFile(filename): ...@@ -43,11 +43,8 @@ def _ReadDocFile(filename):
(testutils.GetSourceDir(), filename)) (testutils.GetSourceDir(), filename))
class TestDocs(unittest.TestCase): class TestHooksDocs(unittest.TestCase):
"""Documentation tests. def test(self):
"""
def testHookDocs(self):
"""Check whether all hooks are documented. """Check whether all hooks are documented.
""" """
...@@ -88,6 +85,8 @@ class TestDocs(unittest.TestCase): ...@@ -88,6 +85,8 @@ class TestDocs(unittest.TestCase):
msg=("Missing documentation for hook %s/%s" % msg=("Missing documentation for hook %s/%s" %
(lucls.HTYPE, lucls.HPATH))) (lucls.HTYPE, lucls.HPATH)))
class TestRapiDocs(unittest.TestCase):
def _CheckRapiResource(self, uri, fixup, handler): def _CheckRapiResource(self, uri, fixup, handler):
docline = "%s resource." % uri docline = "%s resource." % uri
self.assertEqual(handler.__doc__.splitlines()[0].strip(), docline, self.assertEqual(handler.__doc__.splitlines()[0].strip(), docline,
...@@ -100,7 +99,7 @@ class TestDocs(unittest.TestCase): ...@@ -100,7 +99,7 @@ class TestDocs(unittest.TestCase):
self.assertTrue(VALID_URI_RE.match(uri), msg="Invalid URI %r" % uri) self.assertTrue(VALID_URI_RE.match(uri), msg="Invalid URI %r" % uri)
def testRapiDocs(self): def test(self):
"""Check whether all RAPI resources are documented. """Check whether all RAPI resources are documented.
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment