robotframework-testdoc 0.2.4__py3-none-any.whl → 0.2.6__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.
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/METADATA +1 -1
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/RECORD +11 -11
- testdoc/{html_rendering → html/rendering}/render.py +6 -6
- testdoc/html/templates/v2/jinja_template_03.html +1 -5
- testdoc/parser/modifier/sourceprefixmodifier.py +1 -1
- testdoc/parser/testcaseparser.py +16 -7
- testdoc/testdoc.py +1 -1
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/WHEEL +0 -0
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/entry_points.txt +0 -0
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/licenses/LICENSE +0 -0
- {robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/top_level.txt +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
robotframework_testdoc-0.2.
|
|
1
|
+
robotframework_testdoc-0.2.6.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
2
2
|
testdoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
testdoc/__main__.py,sha256=09c4nsw4Vnp1LaK0CnlofJQFbKmeFexOXyTBDY9NrFk,67
|
|
4
4
|
testdoc/cli.py,sha256=el9eqTr4MjxF91XancigF6U7nJ5ffSXw7Wnhna3OkW0,5027
|
|
5
5
|
testdoc/default.toml,sha256=PK7O2gat8326ZYOXBC1mt6-5ceBhdbgs0BL1uo4XLjQ,87
|
|
6
|
-
testdoc/testdoc.py,sha256=
|
|
6
|
+
testdoc/testdoc.py,sha256=WpghXZ_frebqJ0BkP_5EM34bVfyLTaCr1z-lYbitS08,762
|
|
7
7
|
testdoc/helper/cliargs.py,sha256=nsgxXho8QAtcxF5B0OCriLuUEByGQwagDkvR7ISAGWA,2627
|
|
8
8
|
testdoc/helper/datetimeconverter.py,sha256=1IuJ_rZlKKut3pallS9WSdlQ00YNQX2Nhf2oYWt7QDc,159
|
|
9
9
|
testdoc/helper/logger.py,sha256=STPEEdMIGpK004xHDskj8zzW3knBWP05GllYajQMaSY,272
|
|
10
10
|
testdoc/helper/pathconverter.py,sha256=iY7VBofJxiQHevlLO_kek80mwmaB9gdnHWmUzHowCqk,2096
|
|
11
11
|
testdoc/helper/toml_reader.py,sha256=JUpCdUQAwS-zImH0fU9leziM8Mc9CXAAHFUs6E0eQRA,323
|
|
12
12
|
testdoc/html/images/robotframework.svg,sha256=w1yNL6XtuHOCCwzjGX3pZQG7ZcJghzllvc7cQ9MKKbQ,1426
|
|
13
|
+
testdoc/html/rendering/render.py,sha256=Q_zDQHPrr00tHlzEGdDuHV66jljbSFBIn3XuLgJKdPw,1957
|
|
13
14
|
testdoc/html/templates/v1/jinja_template_01.html,sha256=H0CVKV3HljrdQeT_4hWJq3xNw6kc5vqiJtzCXoWBtdY,18389
|
|
14
15
|
testdoc/html/templates/v1/jinja_template_02.html,sha256=0CFAqCHQ035hsHgxZsirHgsdZO5-jdUH9SUQmy3EHkg,5152
|
|
15
|
-
testdoc/html/templates/v2/jinja_template_03.html,sha256=
|
|
16
|
+
testdoc/html/templates/v2/jinja_template_03.html,sha256=r0PJIgDp8oATZBp2hHD30djGZRMpSJA9GKuXa0HkCFc,15886
|
|
16
17
|
testdoc/html/themes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
18
|
testdoc/html/themes/theme_config.py,sha256=3AFUSoddhAZswcEsshbvqcnmbLOFaBYUFy-lrfNBV3Q,1495
|
|
18
19
|
testdoc/html/themes/themes.py,sha256=6xlHW7O-XO9Z1B33_aRwzffkuWR65jM7CYXsZWUjdmY,1091
|
|
19
|
-
testdoc/
|
|
20
|
-
testdoc/parser/testcaseparser.py,sha256=CXZRS1mvHx1O6G2FgqF8T_dWp1RcSJbeN7Le0ZInows,6405
|
|
20
|
+
testdoc/parser/testcaseparser.py,sha256=tfaBfcz2t8Iiu558oDNCGQjQuWphbJTJlsInCTTTgFU,6835
|
|
21
21
|
testdoc/parser/testsuiteparser.py,sha256=7-t_Kdw6527x_bQ_IWJgrvUnGC2umK9mjjJToWVWC_k,6020
|
|
22
|
-
testdoc/parser/modifier/sourceprefixmodifier.py,sha256=
|
|
22
|
+
testdoc/parser/modifier/sourceprefixmodifier.py,sha256=uJTuF3KxtDt4m4nqJ9yF6NzdsjXUZGhRYsP9y9hqQ5k,3964
|
|
23
23
|
testdoc/parser/modifier/suitefilemodifier.py,sha256=OuDuleQj4dRjUcu0AROEPZ-2vR3lWJfWmQVuoWLkXuY,4865
|
|
24
|
-
robotframework_testdoc-0.2.
|
|
25
|
-
robotframework_testdoc-0.2.
|
|
26
|
-
robotframework_testdoc-0.2.
|
|
27
|
-
robotframework_testdoc-0.2.
|
|
28
|
-
robotframework_testdoc-0.2.
|
|
24
|
+
robotframework_testdoc-0.2.6.dist-info/METADATA,sha256=HJPzhuHpUoO2EWXPhaxBnU1aKlyz_xXOffhZXcgj14A,6947
|
|
25
|
+
robotframework_testdoc-0.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
26
|
+
robotframework_testdoc-0.2.6.dist-info/entry_points.txt,sha256=BUHy23mdlGCqYOWpsvRhSb1c0tPMzIwyTwr-sHI6xUs,45
|
|
27
|
+
robotframework_testdoc-0.2.6.dist-info/top_level.txt,sha256=p1axpYooAmdwwXQOzFsSXF3u_-88QFKCDxPf67siv3Y,8
|
|
28
|
+
robotframework_testdoc-0.2.6.dist-info/RECORD,,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from jinja2 import Environment, FileSystemLoader
|
|
2
2
|
import os
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
4
|
+
from ...html.themes.theme_config import ThemeConfig
|
|
5
|
+
from ...helper.cliargs import CommandLineArguments
|
|
6
|
+
from ...helper.datetimeconverter import DateTimeConverter
|
|
7
|
+
from ...helper.logger import Logger
|
|
8
8
|
|
|
9
9
|
class TestDocHtmlRendering():
|
|
10
10
|
|
|
@@ -17,11 +17,11 @@ class TestDocHtmlRendering():
|
|
|
17
17
|
if self.args.html_template == "v1":
|
|
18
18
|
self.HTML_TEMPLATE_VERSION = self.args.html_template
|
|
19
19
|
self.HTML_TEMPLATE_NAME = "jinja_template_01.html"
|
|
20
|
-
self.TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "
|
|
20
|
+
self.TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "templates", self.HTML_TEMPLATE_VERSION)
|
|
21
21
|
elif self.args.html_template == "v2":
|
|
22
22
|
self.HTML_TEMPLATE_VERSION = self.args.html_template
|
|
23
23
|
self.HTML_TEMPLATE_NAME = "jinja_template_03.html"
|
|
24
|
-
self.TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "
|
|
24
|
+
self.TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "templates", self.HTML_TEMPLATE_VERSION)
|
|
25
25
|
else:
|
|
26
26
|
raise ValueError(f"CLI Argument 'html_template' got value '{self.args.html_template}' - value not known!")
|
|
27
27
|
|
|
@@ -77,11 +77,7 @@
|
|
|
77
77
|
<tr>
|
|
78
78
|
<td style="width: 10%; font-weight: bold;">🏷 Tags:</td>
|
|
79
79
|
<td style="text-align: left;">
|
|
80
|
-
{
|
|
81
|
-
{{ test.tags }}
|
|
82
|
-
{% else %}
|
|
83
|
-
{{ test.tags | join(', ') }}
|
|
84
|
-
{% endif %}
|
|
80
|
+
{{ test.tags | join(', ') }}
|
|
85
81
|
</td>
|
|
86
82
|
</tr>
|
|
87
83
|
{% endif %}
|
|
@@ -85,7 +85,7 @@ class GitLabModifier():
|
|
|
85
85
|
git_root = self._get_git_root(file_path)
|
|
86
86
|
git_branch = self._get_git_branch(git_root)
|
|
87
87
|
if not git_root:
|
|
88
|
-
return "
|
|
88
|
+
return "Unable to fetch GitLab URL!"
|
|
89
89
|
rel_path = os.path.relpath(file_path, git_root).replace(os.sep, "/")
|
|
90
90
|
return prefix.rstrip("/") + "/-/blob/" + git_branch + "/" + rel_path
|
|
91
91
|
|
testdoc/parser/testcaseparser.py
CHANGED
|
@@ -19,7 +19,7 @@ class TestCaseParser():
|
|
|
19
19
|
"name": test.name,
|
|
20
20
|
"doc": "<br>".join(line.replace("\\n","") for line in test.doc.splitlines()
|
|
21
21
|
if line.strip()) if test.doc else "No Test Case Documentation Available",
|
|
22
|
-
"tags": test.tags if test.tags else "No Tags Configured",
|
|
22
|
+
"tags": test.tags if test.tags else ["No Tags Configured"],
|
|
23
23
|
"source": str(test.source),
|
|
24
24
|
"keywords": self._keyword_parser(test.body)
|
|
25
25
|
}
|
|
@@ -47,7 +47,7 @@ class TestCaseParser():
|
|
|
47
47
|
|
|
48
48
|
# Fallback in case of no keywords
|
|
49
49
|
if len(_keyword_object) == 0:
|
|
50
|
-
return "No Keyword Calls in Test"
|
|
50
|
+
return ["No Keyword Calls in Test"]
|
|
51
51
|
return _keyword_object
|
|
52
52
|
|
|
53
53
|
def _handle_keyword_types(self, kw: Keyword, indent: int = 0):
|
|
@@ -105,6 +105,19 @@ class TestCaseParser():
|
|
|
105
105
|
result.extend(self._handle_keyword_types(subkw, indent=indent+1))
|
|
106
106
|
result.append(f"{_indent}END")
|
|
107
107
|
|
|
108
|
+
# GROUP loop
|
|
109
|
+
elif kw_type == "GROUP":
|
|
110
|
+
header = f"{_indent}GROUP"
|
|
111
|
+
if not kw.name == "":
|
|
112
|
+
header += f"{_sd}{kw.name}"
|
|
113
|
+
if hasattr(kw, 'condition') and kw.condition:
|
|
114
|
+
header += f" {kw.condition}"
|
|
115
|
+
result.append(header)
|
|
116
|
+
if hasattr(kw, 'body'):
|
|
117
|
+
for subkw in kw.body:
|
|
118
|
+
result.extend(self._handle_keyword_types(subkw, indent=indent+1))
|
|
119
|
+
result.append(f"{_indent}END")
|
|
120
|
+
|
|
108
121
|
# WHILE loop
|
|
109
122
|
elif kw_type == "WHILE":
|
|
110
123
|
header = f"{_indent}WHILE"
|
|
@@ -134,13 +147,9 @@ class TestCaseParser():
|
|
|
134
147
|
elif kw_type in ("BREAK", "CONTINUE", "RETURN", "ERROR"):
|
|
135
148
|
entry = f"{_indent}{kw_type}"
|
|
136
149
|
if hasattr(kw, 'values') and kw.values:
|
|
137
|
-
entry += f" {
|
|
150
|
+
entry += f" {_sd.join(kw.values)}"
|
|
138
151
|
result.append(entry)
|
|
139
152
|
|
|
140
|
-
# Other types
|
|
141
|
-
elif kw_type in ("COMMENT", "EMPTY"):
|
|
142
|
-
pass
|
|
143
|
-
|
|
144
153
|
# Unknown types
|
|
145
154
|
elif hasattr(kw, 'body'):
|
|
146
155
|
for subkw in kw.body:
|
testdoc/testdoc.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .helper.pathconverter import PathConverter
|
|
2
2
|
from .parser.testsuiteparser import RobotSuiteParser
|
|
3
|
-
from .
|
|
3
|
+
from .html.rendering.render import TestDocHtmlRendering
|
|
4
4
|
from .parser.modifier.suitefilemodifier import SuiteFileModifier
|
|
5
5
|
|
|
6
6
|
class TestDoc():
|
|
File without changes
|
{robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{robotframework_testdoc-0.2.4.dist-info → robotframework_testdoc-0.2.6.dist-info}/top_level.txt
RENAMED
|
File without changes
|