Skip to content

Commit 9936661

Browse files
committed
Tests build HTML and parse it to validate structure
1 parent 1ae7b78 commit 9936661

File tree

16 files changed

+582
-426
lines changed

16 files changed

+582
-426
lines changed

docs/changes/+d97c5f48.misc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Tests build HTML output and parse the HTML to validate the output structure.

tests/python/py3example/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
autoapi_type = "python"
1919
autoapi_dirs = ["example"]
2020
autoapi_python_class_content = "both"
21+
autoapi_keep_files = True
2122
autoapi_options = [
2223
"members",
2324
"undoc-members", # this is temporary until we add docstrings across the codebase
@@ -26,4 +27,4 @@
2627
"special-members",
2728
"imported-members",
2829
"inherited-members",
29-
]
30+
]

tests/python/pyautodoc_typehints/example/example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class A:
22
def test(self, a: int) -> bool:
33
"""Test.
4+
45
Args:
56
a: Argument
67
"""

tests/python/pyautodoc_typehints/example/example2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
class B:
22
def test(self, a: int) -> bool:
33
"""Test.
4+
45
Args:
56
a: Argument
67
"""

tests/python/pyexample/autoapi/index.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/python/pyexample/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ Welcome to pyexample's documentation!
77
=====================================
88

99
.. toctree::
10+
:glob:
1011

11-
manualapi
12+
*
1213

1314

1415

tests/python/pyexample/manualapi.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Autodoc Directives
33

44
.. autoapimodule:: example
55
:members:
6-
:noindex:
76

87

98
.. autoapidecorator:: example.decorator_okay
10-
:noindex:
9+
:noindex:

tests/python/pyexample/null.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Null
2+
====

tests/python/pyiexample/index.rst

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
.. pyexample documentation master file, created by
2-
sphinx-quickstart on Fri May 29 13:34:37 2015.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
6-
Welcome to pyexample's documentation!
7-
=====================================
1+
Welcome to pyiexample's documentation!
2+
======================================
83

94
.. toctree::
105

116
autoapi/index
12-
manualapi
13-
14-
Contents:
15-
16-
.. toctree::
17-
:maxdepth: 2
18-
197

208

219
Indices and tables

tests/python/pyiexample2/index.rst

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
.. pyexample documentation master file, created by
2-
sphinx-quickstart on Fri May 29 13:34:37 2015.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
6-
Welcome to pyexample's documentation!
7-
=====================================
1+
Welcome to pyiexample2's documentation!
2+
=======================================
83

94
.. toctree::
105

116
autoapi/index
12-
manualapi
13-
14-
Contents:
15-
16-
.. toctree::
17-
:maxdepth: 2
18-
197

208

219
Indices and tables

tests/python/pymovedconfpy/autoapi/index.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/python/pypackageexample/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818
autoapi_type = "python"
1919
autoapi_dirs = ["example"]
2020
autoapi_file_pattern = "*.py"
21+
autoapi_keep_files = True

tests/python/pypackageexample/example/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""This is a docstring."""
12
from . import foo
23

34

tests/python/pypackageexample/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
contain the root `toctree` directive.
55
66
Welcome to pypackageexample's documentation!
7-
=====================================
7+
============================================
88

99
.. toctree::
1010

0 commit comments

Comments
 (0)