qase-python-commons 2.0.3__tar.gz → 2.0.4__tar.gz
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.
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/PKG-INFO +1 -1
- qase-python-commons-2.0.4/requirements.txt +5 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/setup.cfg +2 -2
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/PKG-INFO +1 -1
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/requires.txt +1 -1
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/result.py +12 -2
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/testops.py +8 -5
- qase-python-commons-2.0.3/requirements.txt +0 -5
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/.gitignore +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/.isort.cfg +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/.pre-commit-config.yaml +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/AUTHORS.rst +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/CHANGELOG.rst +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/README.md +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/license.txt +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/pyproject.toml +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/setup.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/SOURCES.txt +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/dependency_links.txt +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/namespace_packages.txt +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/not-zip-safe +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/top_level.txt +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/__init__.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/config.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/interceptor.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/loader.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/__init__.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/attachment.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/relation.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/run.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/runtime.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/step.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/suite.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/report.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/utils.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/tests/models/test_run.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/tests/test_config.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/tests/test_report.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/tests/test_utils.py +0 -0
- {qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/tox.ini +0 -0
|
@@ -8,7 +8,7 @@ long-description = file: README.md
|
|
|
8
8
|
long-description-content-type = text/markdown; charset=UTF-8; variant=GFM
|
|
9
9
|
url = https://github.com/qase-tms/qase-python/tree/master/qase-python-commons
|
|
10
10
|
platforms = any
|
|
11
|
-
version = 2.0.
|
|
11
|
+
version = 2.0.4
|
|
12
12
|
classifiers =
|
|
13
13
|
Development Status :: 5 - Production/Stable
|
|
14
14
|
Programming Language :: Python
|
|
@@ -23,7 +23,7 @@ package_dir =
|
|
|
23
23
|
setup_requires = pyscaffold>=3.2a0,<3.3a0
|
|
24
24
|
install_requires =
|
|
25
25
|
certifi>=2022.12.7
|
|
26
|
-
qaseio>=
|
|
26
|
+
qaseio>=4.0.0,<5.0.0
|
|
27
27
|
attrs>=19.3.0
|
|
28
28
|
more_itertools
|
|
29
29
|
python_requires = >=3.7
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
from typing import Type, Optional, Union, Dict, List
|
|
2
|
+
from pathlib import PosixPath
|
|
2
3
|
import time
|
|
3
4
|
import uuid
|
|
4
5
|
import json
|
|
5
6
|
from qaseio.commons.models.step import Step
|
|
7
|
+
from qaseio.commons.models.suite import Suite
|
|
6
8
|
from qaseio.commons.models.relation import Relation
|
|
7
9
|
from qaseio.commons.models.attachment import Attachment
|
|
8
10
|
from qaseio.commons.utils import QaseUtils
|
|
@@ -75,6 +77,7 @@ class Result(object):
|
|
|
75
77
|
self.relations: List[Type[Relation]] = []
|
|
76
78
|
self.muted: bool = False
|
|
77
79
|
self.message: Optional[str] = None
|
|
80
|
+
self.suite: Optional[Type[Suite]] = None
|
|
78
81
|
QaseUtils.get_host_data()
|
|
79
82
|
|
|
80
83
|
def add_message(self, message: str) -> None:
|
|
@@ -98,6 +101,9 @@ class Result(object):
|
|
|
98
101
|
def add_relation(self, relation: Type[Relation]) -> None:
|
|
99
102
|
self.relations.append(relation)
|
|
100
103
|
|
|
104
|
+
def add_suite(self, suite: Type[Suite]) -> None:
|
|
105
|
+
self.suite = suite
|
|
106
|
+
|
|
101
107
|
def get_status(self) -> Optional[str]:
|
|
102
108
|
return self.execution.status
|
|
103
109
|
|
|
@@ -120,9 +126,13 @@ class Result(object):
|
|
|
120
126
|
|
|
121
127
|
def get_duration(self) -> int:
|
|
122
128
|
return self.execution.duration
|
|
123
|
-
|
|
129
|
+
|
|
130
|
+
def get_suite_title(self) -> Optional[str]:
|
|
131
|
+
if self.suite:
|
|
132
|
+
return self.suite.title
|
|
133
|
+
|
|
124
134
|
def set_run_id(self, run_id: str) -> None:
|
|
125
135
|
self.run_id = run_id
|
|
126
136
|
|
|
127
137
|
def to_json(self) -> str:
|
|
128
|
-
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=False, indent=4)
|
|
138
|
+
return json.dumps(self, default=lambda o: o.__str__() if isinstance(o, PosixPath) else o.__dict__, sort_keys=False, indent=4)
|
|
@@ -4,10 +4,7 @@ from qaseio.api.attachments_api import AttachmentsApi
|
|
|
4
4
|
from qaseio.api.projects_api import ProjectsApi
|
|
5
5
|
from qaseio.api.results_api import ResultsApi
|
|
6
6
|
from qaseio.api.runs_api import RunsApi
|
|
7
|
-
from qaseio.
|
|
8
|
-
from qaseio.model.result_create_bulk import ResultCreateBulk
|
|
9
|
-
from qaseio.model.result_create import ResultCreate
|
|
10
|
-
from qaseio.model.result_create_case import ResultCreateCase
|
|
7
|
+
from qaseio.models import RunCreate, ResultcreateBulk, ResultCreate, ResultCreateCase
|
|
11
8
|
from qaseio.rest import ApiException
|
|
12
9
|
from qaseio.commons.models.attachment import Attachment
|
|
13
10
|
from qaseio.commons.models.step import Step
|
|
@@ -136,6 +133,9 @@ class QaseTestOps:
|
|
|
136
133
|
if (result.get_field('layer')):
|
|
137
134
|
case_data["layer"] = result.get_field('layer')
|
|
138
135
|
|
|
136
|
+
if result.get_suite_title():
|
|
137
|
+
case_data["suite_title"] = "\t".join(result.get_suite_title().split("."))
|
|
138
|
+
|
|
139
139
|
results.append({
|
|
140
140
|
"case_id": result.get_testops_id(),
|
|
141
141
|
"status": result.execution.status,
|
|
@@ -160,7 +160,7 @@ class QaseTestOps:
|
|
|
160
160
|
api_results.create_result_bulk(
|
|
161
161
|
code=self.project_code,
|
|
162
162
|
id=self.run_id,
|
|
163
|
-
result_create_bulk=
|
|
163
|
+
result_create_bulk=ResultcreateBulk(
|
|
164
164
|
results=chunk
|
|
165
165
|
)
|
|
166
166
|
)
|
|
@@ -325,6 +325,9 @@ class QaseTestOps:
|
|
|
325
325
|
if (result.get_field('layer')):
|
|
326
326
|
case_data["layer"] = result.get_field('layer')
|
|
327
327
|
|
|
328
|
+
if result.get_suite_title():
|
|
329
|
+
case_data["suite_title"] = "\t".join(result.get_suite_title().split("."))
|
|
330
|
+
|
|
328
331
|
try:
|
|
329
332
|
api_results.create_result(
|
|
330
333
|
code=self.project_code,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qase_python_commons.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/__init__.py
RENAMED
|
File without changes
|
{qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/attachment.py
RENAMED
|
File without changes
|
{qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/relation.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase-python-commons-2.0.3 → qase-python-commons-2.0.4}/src/qaseio/commons/models/runtime.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|