sphinx-test-reports 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docs/conf.py +210 -0
- docs/ub_theme/__init__.py +0 -0
- docs/ub_theme/conf.py +21 -0
- sphinx_test_reports-1.1.0.dist-info/AUTHORS +8 -0
- sphinx_test_reports-1.1.0.dist-info/LICENSE +21 -0
- sphinx_test_reports-1.1.0.dist-info/METADATA +49 -0
- sphinx_test_reports-1.1.0.dist-info/RECORD +56 -0
- sphinx_test_reports-1.1.0.dist-info/WHEEL +5 -0
- sphinx_test_reports-1.1.0.dist-info/top_level.txt +3 -0
- sphinxcontrib/__init__.py +1 -0
- sphinxcontrib/test_reports/__init__.py +2 -0
- sphinxcontrib/test_reports/css/common.css +32 -0
- sphinxcontrib/test_reports/directives/__init__.py +5 -0
- sphinxcontrib/test_reports/directives/test_case.py +178 -0
- sphinxcontrib/test_reports/directives/test_common.py +137 -0
- sphinxcontrib/test_reports/directives/test_env.py +223 -0
- sphinxcontrib/test_reports/directives/test_file.py +138 -0
- sphinxcontrib/test_reports/directives/test_report.py +81 -0
- sphinxcontrib/test_reports/directives/test_report_template.txt +51 -0
- sphinxcontrib/test_reports/directives/test_results.py +104 -0
- sphinxcontrib/test_reports/directives/test_suite.py +195 -0
- sphinxcontrib/test_reports/environment.py +98 -0
- sphinxcontrib/test_reports/exceptions.py +31 -0
- sphinxcontrib/test_reports/functions/__init__.py +19 -0
- sphinxcontrib/test_reports/jsonparser.py +90 -0
- sphinxcontrib/test_reports/junitparser.py +146 -0
- sphinxcontrib/test_reports/test_reports.py +179 -0
- tests/__init__.py +0 -0
- tests/conftest.py +57 -0
- tests/doc_test/basic_doc/conf.py +161 -0
- tests/doc_test/custom_tr_koi8_template/conf.py +209 -0
- tests/doc_test/custom_tr_template/conf.py +206 -0
- tests/doc_test/custom_tr_utf8_template/conf.py +208 -0
- tests/doc_test/custom_types/conf.py +172 -0
- tests/doc_test/doc_test_ctest_file/conf.py +194 -0
- tests/doc_test/doc_test_file/conf.py +194 -0
- tests/doc_test/env_report_doc/conf.py +162 -0
- tests/doc_test/env_report_doc_default/conf.py +162 -0
- tests/doc_test/env_report_doc_raw/conf.py +162 -0
- tests/doc_test/env_report_warnings/conf.py +161 -0
- tests/doc_test/json_parser/conf.py +192 -0
- tests/doc_test/json_parser_complex/conf.py +219 -0
- tests/doc_test/many_testsuites_doc/conf.py +164 -0
- tests/doc_test/needs_linking/conf.py +194 -0
- tests/doc_test/pytest_6_2/conf.py +161 -0
- tests/doc_test/testsuites_doc/conf.py +161 -0
- tests/test_basic_doc.py +28 -0
- tests/test_custom_template.py +50 -0
- tests/test_custom_types.py +17 -0
- tests/test_env.py +160 -0
- tests/test_json_parser.py +109 -0
- tests/test_junit_parser.py +140 -0
- tests/test_needs_linking.py +21 -0
- tests/test_suites.py +38 -0
- tests/test_test_ctest_file.py +41 -0
- tests/test_test_file.py +36 -0
docs/conf.py
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Configuration file for the Sphinx documentation builder.
|
|
3
|
+
#
|
|
4
|
+
# This file does only contain a selection of the most common options. For a
|
|
5
|
+
# full list see the documentation:
|
|
6
|
+
# http://www.sphinx-doc.org/en/stable/config
|
|
7
|
+
|
|
8
|
+
# -- Path setup --------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
import datetime
|
|
11
|
+
import os
|
|
12
|
+
|
|
13
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
14
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
15
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
16
|
+
#
|
|
17
|
+
# import os
|
|
18
|
+
import sys
|
|
19
|
+
|
|
20
|
+
sys.path.append(os.path.abspath("."))
|
|
21
|
+
|
|
22
|
+
from ub_theme.conf import html_theme_options # noqa
|
|
23
|
+
|
|
24
|
+
# -- Project information -----------------------------------------------------
|
|
25
|
+
|
|
26
|
+
project = "sphinx-test-reports"
|
|
27
|
+
now = datetime.datetime.now()
|
|
28
|
+
copyright = f"team useblocks, 2017-{now.year}"
|
|
29
|
+
author = "team useblocks"
|
|
30
|
+
|
|
31
|
+
# The short X.Y version
|
|
32
|
+
version = "1.1"
|
|
33
|
+
# The full version, including alpha/beta/rc tags
|
|
34
|
+
release = "1.1.0"
|
|
35
|
+
|
|
36
|
+
needs_id_regex = ".*"
|
|
37
|
+
needs_css = "dark.css"
|
|
38
|
+
|
|
39
|
+
# -- General configuration ---------------------------------------------------
|
|
40
|
+
|
|
41
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
|
42
|
+
#
|
|
43
|
+
# needs_sphinx = '1.0'
|
|
44
|
+
|
|
45
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
46
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
47
|
+
# ones.
|
|
48
|
+
extensions = [
|
|
49
|
+
"sphinx_needs",
|
|
50
|
+
"sphinxcontrib.test_reports",
|
|
51
|
+
"sphinxcontrib.plantuml",
|
|
52
|
+
"sphinx_design",
|
|
53
|
+
"sphinx_immaterial",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
cwd = os.getcwd()
|
|
57
|
+
plantuml = "java -jar %s" % os.path.join(cwd, "utils/plantuml.jar")
|
|
58
|
+
|
|
59
|
+
# If we are running on windows, we need to manipulate the path,
|
|
60
|
+
# otherwise plantuml will have problems.
|
|
61
|
+
if os.name == "nt":
|
|
62
|
+
plantuml = plantuml.replace("/", "\\")
|
|
63
|
+
plantuml = plantuml.replace("\\", "\\\\")
|
|
64
|
+
|
|
65
|
+
plantuml_output_format = "png"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
69
|
+
templates_path = ["_templates", "ub_theme/templates"]
|
|
70
|
+
# Add a custom test report template. Please add a relative path from this conf.py
|
|
71
|
+
# tr_report_template = "./custom_test_report_template.txt"
|
|
72
|
+
|
|
73
|
+
# The suffix(es) of source filenames.
|
|
74
|
+
# You can specify multiple suffix as a list of string:
|
|
75
|
+
#
|
|
76
|
+
# source_suffix = ['.rst', '.md']
|
|
77
|
+
source_suffix = ".rst"
|
|
78
|
+
|
|
79
|
+
# The master toctree document.
|
|
80
|
+
master_doc = "index"
|
|
81
|
+
|
|
82
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
83
|
+
# for a list of supported languages.
|
|
84
|
+
#
|
|
85
|
+
# This is also used if you do content translation via gettext catalogs.
|
|
86
|
+
# Usually you set "language" from the command line for these cases.
|
|
87
|
+
language = "en"
|
|
88
|
+
|
|
89
|
+
# List of patterns, relative to source directory, that match files and
|
|
90
|
+
# directories to ignore when looking for source files.
|
|
91
|
+
# This pattern also affects html_static_path and html_extra_path .
|
|
92
|
+
exclude_patterns = []
|
|
93
|
+
|
|
94
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
|
95
|
+
pygments_style = "sphinx"
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# -- Options for HTML output -------------------------------------------------
|
|
99
|
+
|
|
100
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
101
|
+
# a list of builtin themes.
|
|
102
|
+
#
|
|
103
|
+
html_theme = "sphinx_immaterial"
|
|
104
|
+
|
|
105
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
|
106
|
+
# further. For a list of options available for each theme, see the
|
|
107
|
+
# documentation.
|
|
108
|
+
#
|
|
109
|
+
html_logo = "_static/sphinx-test-reports-logo.svg"
|
|
110
|
+
html_favicon = "_static/sphinx-test-reports-logo.svg"
|
|
111
|
+
html_title = "Sphinx-Test-Reports"
|
|
112
|
+
|
|
113
|
+
other_options = {
|
|
114
|
+
"repo_url": "https://github.com/useblocks/sphinx-test-reports",
|
|
115
|
+
"repo_name": "sphinx-test-reports",
|
|
116
|
+
"font": False,
|
|
117
|
+
}
|
|
118
|
+
html_theme_options.update(other_options)
|
|
119
|
+
html_theme_options["features"].extend(["navigation.tabs", "navigation.tabs.sticky"])
|
|
120
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
121
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
122
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
123
|
+
html_static_path = ["_static", "ub_theme/css", "ub_theme/js"]
|
|
124
|
+
html_css_files = ["ub-theme.css"]
|
|
125
|
+
html_js_files = ["jquery.js"]
|
|
126
|
+
|
|
127
|
+
# -- Options for HTMLHelp output ---------------------------------------------
|
|
128
|
+
|
|
129
|
+
# Output file base name for HTML help builder.
|
|
130
|
+
htmlhelp_basename = "sphinx-test-reportsdoc"
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# -- Options for LaTeX output ------------------------------------------------
|
|
134
|
+
|
|
135
|
+
latex_elements = {
|
|
136
|
+
# The paper size ('letterpaper' or 'a4paper').
|
|
137
|
+
#
|
|
138
|
+
# 'papersize': 'letterpaper',
|
|
139
|
+
# The font size ('10pt', '11pt' or '12pt').
|
|
140
|
+
#
|
|
141
|
+
# 'pointsize': '10pt',
|
|
142
|
+
# Additional stuff for the LaTeX preamble.
|
|
143
|
+
#
|
|
144
|
+
# 'preamble': '',
|
|
145
|
+
# Latex figure (float) alignment
|
|
146
|
+
#
|
|
147
|
+
# 'figure_align': 'htbp',
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
|
151
|
+
# (source start file, target name, title,
|
|
152
|
+
# author, documentclass [howto, manual, or own class]).
|
|
153
|
+
latex_documents = [
|
|
154
|
+
(
|
|
155
|
+
master_doc,
|
|
156
|
+
"sphinx-test-reports.tex",
|
|
157
|
+
"sphinx-test-reports Documentation",
|
|
158
|
+
"team useblocks",
|
|
159
|
+
"manual",
|
|
160
|
+
),
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
# -- Options for manual page output ------------------------------------------
|
|
165
|
+
|
|
166
|
+
# One entry per manual page. List of tuples
|
|
167
|
+
# (source start file, name, description, authors, manual section).
|
|
168
|
+
man_pages = [
|
|
169
|
+
(
|
|
170
|
+
master_doc,
|
|
171
|
+
"sphinx-test-reports",
|
|
172
|
+
"sphinx-test-reports Documentation",
|
|
173
|
+
[author],
|
|
174
|
+
1,
|
|
175
|
+
)
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
# -- Options for Texinfo output ----------------------------------------------
|
|
180
|
+
|
|
181
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
|
182
|
+
# (source start file, target name, title, author,
|
|
183
|
+
# dir menu entry, description, category)
|
|
184
|
+
texinfo_documents = [
|
|
185
|
+
(
|
|
186
|
+
master_doc,
|
|
187
|
+
"sphinx-test-reports",
|
|
188
|
+
"sphinx-test-reports Documentation",
|
|
189
|
+
author,
|
|
190
|
+
"sphinx-test-reports",
|
|
191
|
+
"One line description of project.",
|
|
192
|
+
"Miscellaneous",
|
|
193
|
+
),
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
# LINKCHECK config
|
|
197
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html?highlight=linkcheck#options-for-the-linkcheck-builder
|
|
198
|
+
linkcheck_ignore = [
|
|
199
|
+
r"http://localhost:\d+",
|
|
200
|
+
r"http://127.0.0.1:\d+",
|
|
201
|
+
r"https://fonts.googleapis.com",
|
|
202
|
+
]
|
|
203
|
+
|
|
204
|
+
linkcheck_request_headers = {
|
|
205
|
+
"*": {
|
|
206
|
+
"User-Agent": "Mozilla/5.0",
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
linkcheck_workers = 5
|
|
File without changes
|
docs/ub_theme/conf.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
html_theme_options = {
|
|
2
|
+
"icon": {
|
|
3
|
+
"repo": "fontawesome/brands/github",
|
|
4
|
+
},
|
|
5
|
+
"font": {"code": "JetBrains Mono", "text": "Recursive"},
|
|
6
|
+
"globaltoc_collapse": True,
|
|
7
|
+
"features": [
|
|
8
|
+
"navigation.top",
|
|
9
|
+
"search.share",
|
|
10
|
+
"navigation.tracking",
|
|
11
|
+
"toc.follow",
|
|
12
|
+
"content.tabs.link",
|
|
13
|
+
],
|
|
14
|
+
"palette": {
|
|
15
|
+
"scheme": "slate",
|
|
16
|
+
"primary": "yellow",
|
|
17
|
+
"accent": "yellow",
|
|
18
|
+
},
|
|
19
|
+
"toc_title_is_page_title": True,
|
|
20
|
+
"toc_title": "Contents",
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 useblocks
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: sphinx-test-reports
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Sphinx extension for showing test results and test environment information inside sphinx documentations
|
|
5
|
+
Author-email: team useblocks <info@useblocks.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/useblocks/sphinx-test-reports
|
|
8
|
+
Project-URL: Repository, https://github.com/useblocks/sphinx-test-reports.git
|
|
9
|
+
Project-URL: Documentation, https://sphinx-test-reports.readthedocs.io/en/latest/
|
|
10
|
+
Project-URL: download-url, http://pypi.python.org/pypi/sphinx-test-reports
|
|
11
|
+
Keywords: sphinx,documentation,test-reports
|
|
12
|
+
Classifier: Framework :: Sphinx
|
|
13
|
+
Classifier: Framework :: Sphinx :: Extension
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Documentation
|
|
25
|
+
Requires-Python: >=3.6
|
|
26
|
+
Description-Content-Type: text/x-rst
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
License-File: AUTHORS
|
|
29
|
+
Requires-Dist: sphinx>4.0
|
|
30
|
+
Requires-Dist: lxml
|
|
31
|
+
Requires-Dist: sphinx-needs>=1.0.1
|
|
32
|
+
Provides-Extra: development
|
|
33
|
+
Requires-Dist: wheel; extra == "development"
|
|
34
|
+
|
|
35
|
+
Sphinx-Test-Reports
|
|
36
|
+
===================
|
|
37
|
+
|
|
38
|
+
.. image:: docs/_static/sphinx-test-reports-logo.png
|
|
39
|
+
|
|
40
|
+
Sphinx-Test-Reports shows test results of your unit tests inside your sphinx documentation.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Functions
|
|
44
|
+
---------
|
|
45
|
+
|
|
46
|
+
* Shows test results of **junit based test xml reports** as table
|
|
47
|
+
* Shows test environment information of **tox-envreport based json reports** as table
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
docs/conf.py,sha256=p9WvQRss8hLDgFYbi9M-B9PZQ--RoqxtHL4QxEZnUCE,6206
|
|
2
|
+
docs/ub_theme/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
docs/ub_theme/conf.py,sha256=jd60YaoVZsNns6y2rAEzWrHl5fM3tC_Z9sTbfg2cfpw,515
|
|
4
|
+
sphinxcontrib/__init__.py,sha256=B9LgGPc-xGhiDTC4XvUjqTtVANpPUzFUZ-l4a0REqG4,70
|
|
5
|
+
sphinxcontrib/test_reports/__init__.py,sha256=SPOwMp5h-c7V12VrsxeJyZQKlurmm6EC9cGJx7ij2qQ,133
|
|
6
|
+
sphinxcontrib/test_reports/environment.py,sha256=arxKCnAgqhgeHrs-c6JmG6HscjHG_t9NsCHI0ZHLVpM,3832
|
|
7
|
+
sphinxcontrib/test_reports/exceptions.py,sha256=aO5y4Q8M5UhOhYINkUH5kmMLdm-EPFCfv4NTuuGXuuY,658
|
|
8
|
+
sphinxcontrib/test_reports/jsonparser.py,sha256=SLgojBDhR5ZLL7e6B10b6ZW2N-Shca1S1LlKEf1A5r4,2726
|
|
9
|
+
sphinxcontrib/test_reports/junitparser.py,sha256=5KKnlc1MOkqAi2XBLgOPL7hbXP9Z-N3lrHrKVvlBmtU,5320
|
|
10
|
+
sphinxcontrib/test_reports/test_reports.py,sha256=H2dt15miTxlAcMnUPK5SmoFIwv_65oCAmA_RTq918so,6184
|
|
11
|
+
sphinxcontrib/test_reports/css/common.css,sha256=V8ZS50xdgItg8eqv_8QWIPmqGD-EZtTe8dEeD4jyGLs,554
|
|
12
|
+
sphinxcontrib/test_reports/directives/__init__.py,sha256=7uwydS6BgRzjs6FLWCsRzeyjDxOr7WRdriibVEfJSo0,268
|
|
13
|
+
sphinxcontrib/test_reports/directives/test_case.py,sha256=zsnGuI_5vzsYtvPgy6TyPb677ZCnONfNqnhz9EtCqPg,5270
|
|
14
|
+
sphinxcontrib/test_reports/directives/test_common.py,sha256=e8OjNNa5cqRtd6Kvnd_B7rTNshw5miZRe9iUYiufus4,4794
|
|
15
|
+
sphinxcontrib/test_reports/directives/test_env.py,sha256=BWYUs8taqoqjGjzhJKKrinaeNXJ-E-NzFCRjhSTkwEY,7752
|
|
16
|
+
sphinxcontrib/test_reports/directives/test_file.py,sha256=txHzMMwz6Ou1Bu6SlKY7e1LZJwwjTPWfJ97ztVKkzRs,4668
|
|
17
|
+
sphinxcontrib/test_reports/directives/test_report.py,sha256=waIMx4quRuyvuKOOOJNODAJWV5ZILp0-2tBpjiaSMzk,2591
|
|
18
|
+
sphinxcontrib/test_reports/directives/test_report_template.txt,sha256=LrPBKyWeTEljBQzpgk1yc__eCYq3YQBg33w8UCpbsEM,1226
|
|
19
|
+
sphinxcontrib/test_reports/directives/test_results.py,sha256=7Mf4m4LUqNLd3yZG30Q-WrnS4-JD5OcR2xmU0F_C9xY,3224
|
|
20
|
+
sphinxcontrib/test_reports/directives/test_suite.py,sha256=d3u7UcBi5bvxwvZ42PNRZXw8DTDfmf7gSeeC9HH8nXo,6854
|
|
21
|
+
sphinxcontrib/test_reports/functions/__init__.py,sha256=xZtQACJ4896oNS6fU6cRXsfOMSa4Ev1e4Kx8ZnsoTkU,643
|
|
22
|
+
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
tests/conftest.py,sha256=Io2QqoYJ8LnBoWPILk-s_m0Hl43ZO4UWw_jNuw6MytM,1987
|
|
24
|
+
tests/test_basic_doc.py,sha256=4hgYIpfdOGNn26cFcOzdGJhWSyvEaruI5smjLtINbnM,763
|
|
25
|
+
tests/test_custom_template.py,sha256=4uCxrVrPOZM7Ho5JE3bS_6KMRE-hYjUSnYfVB7yAS1I,1213
|
|
26
|
+
tests/test_custom_types.py,sha256=cwYcEygIF6fhlEr4K6HypZoAqz3alR-aztqHq--ofrs,396
|
|
27
|
+
tests/test_env.py,sha256=QXLPFCJOYCsLt7RFcFOUD5gEB6BTTEi-bxWSlSM5S1U,4935
|
|
28
|
+
tests/test_json_parser.py,sha256=q2cT5bmGL184IN9D3WS-l0Lm_DNzZyFYgKsC5rzZZbo,3661
|
|
29
|
+
tests/test_junit_parser.py,sha256=g7Znt9of4sEyYhuSpYs22sydeBYWy7HpnkN-wgdUnpM,4849
|
|
30
|
+
tests/test_needs_linking.py,sha256=v9bN_C1aGDnI8R7KvDCdGlwUZU0SEEWwrmR-s3lk3Pg,697
|
|
31
|
+
tests/test_suites.py,sha256=EAINe-kSoeVP96bh0JIUuLhgKYOnNkJrgmpczFByrbs,957
|
|
32
|
+
tests/test_test_ctest_file.py,sha256=vQNribXSMNYJ913j-19xg4Fm_A_yI_BD_z4IURMvmoE,966
|
|
33
|
+
tests/test_test_file.py,sha256=sem0C-0yErNfl1qulhlk3CUjapnlfVX4KCx1Ad6LvbI,818
|
|
34
|
+
tests/doc_test/basic_doc/conf.py,sha256=h60SIbyYziioayxafO86Flm1uuiIyqtKirXZXsuFN08,4991
|
|
35
|
+
tests/doc_test/custom_tr_koi8_template/conf.py,sha256=aukXZRDK74HJV024q2csSUaPN9j-dM3R7UePqIr-hcE,6313
|
|
36
|
+
tests/doc_test/custom_tr_template/conf.py,sha256=2NkMViRLg-Cj8j3jx5P5VS9McXwoF5hZXRHAxGZ-tW4,6218
|
|
37
|
+
tests/doc_test/custom_tr_utf8_template/conf.py,sha256=pZmkw522Sid4ZXsiJDjWEVpnbTOjyRnmTXj7TahIRhI,6247
|
|
38
|
+
tests/doc_test/custom_types/conf.py,sha256=aavU-igdxUcGovofnQqSrlkdTF4BuDNAgq3i2_4o9Ck,5272
|
|
39
|
+
tests/doc_test/doc_test_ctest_file/conf.py,sha256=7-auDJMrtRtHQ7Tcg-uCIP2WLDURmzj1by13BC5S34o,5536
|
|
40
|
+
tests/doc_test/doc_test_file/conf.py,sha256=Kcgyv4pJnMKv6rfZQ_HeaflJVzAGGpZQwlen2XW6BYc,5668
|
|
41
|
+
tests/doc_test/env_report_doc/conf.py,sha256=QWl9G2H9wgXT__T7Osudf8JOyeugXkuKnq0p2Ye8wwg,4992
|
|
42
|
+
tests/doc_test/env_report_doc_default/conf.py,sha256=QWl9G2H9wgXT__T7Osudf8JOyeugXkuKnq0p2Ye8wwg,4992
|
|
43
|
+
tests/doc_test/env_report_doc_raw/conf.py,sha256=QWl9G2H9wgXT__T7Osudf8JOyeugXkuKnq0p2Ye8wwg,4992
|
|
44
|
+
tests/doc_test/env_report_warnings/conf.py,sha256=h60SIbyYziioayxafO86Flm1uuiIyqtKirXZXsuFN08,4991
|
|
45
|
+
tests/doc_test/json_parser/conf.py,sha256=Twpc3gxTkJZBZ4Ijh_vQQ6mU3VTJRqRDLp-czz56YFY,5621
|
|
46
|
+
tests/doc_test/json_parser_complex/conf.py,sha256=uhKmXykX_pcprshHBJqX99ijJMKM5bP-nRTOXeU52Wg,6598
|
|
47
|
+
tests/doc_test/many_testsuites_doc/conf.py,sha256=AMPDdh7m9J_Y86H43m_Le9547AGNDeBZxDPi0k1tRS4,5038
|
|
48
|
+
tests/doc_test/needs_linking/conf.py,sha256=0jEBI02IFmp-5JiAuCUqDBM-ohvvQjdzMVk4nvvjumI,5682
|
|
49
|
+
tests/doc_test/pytest_6_2/conf.py,sha256=h60SIbyYziioayxafO86Flm1uuiIyqtKirXZXsuFN08,4991
|
|
50
|
+
tests/doc_test/testsuites_doc/conf.py,sha256=h60SIbyYziioayxafO86Flm1uuiIyqtKirXZXsuFN08,4991
|
|
51
|
+
sphinx_test_reports-1.1.0.dist-info/AUTHORS,sha256=j2h0UBwxXNdtrjajgxp6r_OxGkbglygErLWCUcqgJ04,159
|
|
52
|
+
sphinx_test_reports-1.1.0.dist-info/LICENSE,sha256=6DxTIomiCU8AghqNmy3KxfJ285agTt94g-j5wNGLpd8,1066
|
|
53
|
+
sphinx_test_reports-1.1.0.dist-info/METADATA,sha256=_05a5tmZbr2hj1HnKc7Zzde71RHbdwyhHpyBYnVzfAQ,1810
|
|
54
|
+
sphinx_test_reports-1.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
55
|
+
sphinx_test_reports-1.1.0.dist-info/top_level.txt,sha256=LQ7aV4J6D-ozAWrOCJPzXzcPWlcVJ6zmRs0YfHukHWc,25
|
|
56
|
+
sphinx_test_reports-1.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__import__("pkg_resources").declare_namespace(__name__) # noqa: F401
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
tr.tr_passed, div.tr_passed {
|
|
2
|
+
background-color: rgba(0,250,0,0.2) !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
tr.tr_failure, div.tr_failure {
|
|
6
|
+
background-color: rgba(250,0,0,0.2) !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
tr.tr_skipped{
|
|
10
|
+
background-color: rgba(0,0,0,0.1) !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
td.status p {
|
|
14
|
+
padding: 3px 5px;
|
|
15
|
+
text-align: center;
|
|
16
|
+
border-radius: 10px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
td.status p.tr_passed{
|
|
20
|
+
border: 1px solid #008000;
|
|
21
|
+
color: #008000;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
td.status p.tr_failure{
|
|
25
|
+
border: 1px solid #800000;
|
|
26
|
+
color: #800000;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
td.status p.tr_skipped{
|
|
30
|
+
border: 1px solid #555;
|
|
31
|
+
color: #555;
|
|
32
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# from .test_case import TestCase, TestCaseDirective
|
|
2
|
+
# from .test_common import TestCommonDirective
|
|
3
|
+
# from .test_file import TestFile, TestFileDirective
|
|
4
|
+
# from .test_report import TestReport, TestReportDirective
|
|
5
|
+
# from .test_suite import TestSuite, TestSuiteDirective
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
from docutils import nodes
|
|
2
|
+
from docutils.parsers.rst import directives
|
|
3
|
+
from sphinx_needs.api import add_need
|
|
4
|
+
from sphinx_needs.utils import add_doc
|
|
5
|
+
|
|
6
|
+
from sphinxcontrib.test_reports.directives.test_common import TestCommonDirective
|
|
7
|
+
from sphinxcontrib.test_reports.exceptions import TestReportInvalidOption
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class TestCase(nodes.General, nodes.Element):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TestCaseDirective(TestCommonDirective):
|
|
15
|
+
"""
|
|
16
|
+
Directive for showing test suites.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
has_content = True
|
|
20
|
+
required_arguments = 1
|
|
21
|
+
optional_arguments = 0
|
|
22
|
+
option_spec = {
|
|
23
|
+
"id": directives.unchanged_required,
|
|
24
|
+
"status": directives.unchanged_required,
|
|
25
|
+
"tags": directives.unchanged_required,
|
|
26
|
+
"links": directives.unchanged_required,
|
|
27
|
+
"collapse": directives.unchanged_required,
|
|
28
|
+
"file": directives.unchanged_required,
|
|
29
|
+
"suite": directives.unchanged_required,
|
|
30
|
+
"case": directives.unchanged_required,
|
|
31
|
+
"classname": directives.unchanged_required,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
final_argument_whitespace = True
|
|
35
|
+
|
|
36
|
+
def __init__(self, *args, **kwargs):
|
|
37
|
+
super().__init__(*args, **kwargs)
|
|
38
|
+
|
|
39
|
+
def run(self, nested=False, suite_count=-1, case_count=-1):
|
|
40
|
+
self.prepare_basic_options()
|
|
41
|
+
self.load_test_file()
|
|
42
|
+
|
|
43
|
+
if nested and suite_count >= 0:
|
|
44
|
+
# access n-th nested suite here
|
|
45
|
+
self.results = self.results[0]["testsuites"][suite_count]
|
|
46
|
+
|
|
47
|
+
suite_name = self.options.get("suite")
|
|
48
|
+
|
|
49
|
+
if suite_name is None:
|
|
50
|
+
raise TestReportInvalidOption("Suite not given!")
|
|
51
|
+
|
|
52
|
+
case_full_name = self.options.get("case")
|
|
53
|
+
class_name = self.options.get("classname")
|
|
54
|
+
if case_full_name is None and class_name is None:
|
|
55
|
+
raise TestReportInvalidOption("Case or classname not given!")
|
|
56
|
+
|
|
57
|
+
suite = None
|
|
58
|
+
for suite_obj in self.results:
|
|
59
|
+
if nested: # nested testsuites
|
|
60
|
+
suite = self.results
|
|
61
|
+
break
|
|
62
|
+
|
|
63
|
+
elif suite_obj["name"] == suite_name:
|
|
64
|
+
suite = suite_obj
|
|
65
|
+
break
|
|
66
|
+
|
|
67
|
+
if suite is None:
|
|
68
|
+
raise TestReportInvalidOption(f"Suite {suite_name} not found in test file {self.test_file}")
|
|
69
|
+
|
|
70
|
+
case = None
|
|
71
|
+
|
|
72
|
+
for case_obj in suite["testcases"]:
|
|
73
|
+
if case_obj["name"] == case_full_name and class_name is None: # noqa: SIM114 # noqa: W503
|
|
74
|
+
case = case_obj
|
|
75
|
+
break
|
|
76
|
+
|
|
77
|
+
elif case_obj["classname"] == class_name and case_full_name is None: # noqa: SIM114 # noqa: W503
|
|
78
|
+
case = case_obj
|
|
79
|
+
break
|
|
80
|
+
|
|
81
|
+
elif case_obj["name"] == case_full_name and case_obj["classname"] == class_name: # noqa: W503
|
|
82
|
+
case = case_obj
|
|
83
|
+
break
|
|
84
|
+
|
|
85
|
+
elif nested and case_count >= 0:
|
|
86
|
+
# access correct case in list
|
|
87
|
+
case = suite["testcases"][case_count]
|
|
88
|
+
break
|
|
89
|
+
|
|
90
|
+
elif nested:
|
|
91
|
+
case = case_obj
|
|
92
|
+
break
|
|
93
|
+
|
|
94
|
+
if case is None:
|
|
95
|
+
raise TestReportInvalidOption(
|
|
96
|
+
"Case {} with classname {} not found in test file {} "
|
|
97
|
+
"and testsuite {}".format(case_full_name, class_name, self.test_file, suite_name)
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
result = case["result"]
|
|
101
|
+
content = self.test_content
|
|
102
|
+
if case["text"] is not None and len(case["text"]) > 0:
|
|
103
|
+
content += """
|
|
104
|
+
|
|
105
|
+
**Text**::
|
|
106
|
+
|
|
107
|
+
{}
|
|
108
|
+
|
|
109
|
+
""".format(
|
|
110
|
+
"\n ".join([x.lstrip() for x in case["text"].split("\n")])
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
if case["message"] is not None and len(case["message"]) > 0:
|
|
114
|
+
content += """
|
|
115
|
+
|
|
116
|
+
**Message**::
|
|
117
|
+
|
|
118
|
+
{}
|
|
119
|
+
|
|
120
|
+
""".format(
|
|
121
|
+
"\n ".join([x.lstrip() for x in case["message"].split("\n")])
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
if case["system-out"] is not None and len(case["system-out"]) > 0:
|
|
125
|
+
content += """
|
|
126
|
+
|
|
127
|
+
**System-out**::
|
|
128
|
+
|
|
129
|
+
{}
|
|
130
|
+
|
|
131
|
+
""".format(
|
|
132
|
+
"\n ".join([x.lstrip() for x in case["system-out"].split("\n")])
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
time = case["time"]
|
|
136
|
+
style = "tr_" + case["result"]
|
|
137
|
+
|
|
138
|
+
import re
|
|
139
|
+
|
|
140
|
+
groups = re.match(r"^(?P<name>[^\[]+)($|\[(?P<param>.*)?\])", case["name"])
|
|
141
|
+
try:
|
|
142
|
+
case_name = groups["name"]
|
|
143
|
+
case_parameter = groups["param"]
|
|
144
|
+
except TypeError:
|
|
145
|
+
case_name = case_full_name
|
|
146
|
+
case_parameter = ""
|
|
147
|
+
|
|
148
|
+
if case_parameter is None:
|
|
149
|
+
case_parameter = ""
|
|
150
|
+
|
|
151
|
+
main_section = []
|
|
152
|
+
docname = self.state.document.settings.env.docname
|
|
153
|
+
main_section += add_need(
|
|
154
|
+
self.app,
|
|
155
|
+
self.state,
|
|
156
|
+
docname,
|
|
157
|
+
self.lineno,
|
|
158
|
+
need_type=self.need_type,
|
|
159
|
+
title=self.test_name,
|
|
160
|
+
id=self.test_id,
|
|
161
|
+
content=content,
|
|
162
|
+
links=self.test_links,
|
|
163
|
+
tags=self.test_tags,
|
|
164
|
+
status=self.test_status,
|
|
165
|
+
collapse=self.collapse,
|
|
166
|
+
file=self.test_file_given,
|
|
167
|
+
suite=suite["name"],
|
|
168
|
+
case=case_full_name,
|
|
169
|
+
case_name=case_name,
|
|
170
|
+
case_parameter=case_parameter,
|
|
171
|
+
classname=class_name,
|
|
172
|
+
result=result,
|
|
173
|
+
time=time,
|
|
174
|
+
style=style,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
add_doc(self.env, docname)
|
|
178
|
+
return main_section
|