qase-python-commons 3.2.4__tar.gz → 3.2.6__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.
Potentially problematic release.
This version of qase-python-commons might be problematic. Click here for more details.
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/PKG-INFO +2 -2
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/pyproject.toml +1 -1
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/api_v2_client.py +1 -2
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/logger.py +18 -10
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/PKG-INFO +2 -2
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/README.md +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/setup.cfg +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/__init__.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/api_v1_client.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/base_api_client.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/config.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/exceptions/reporter.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/loader.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/__init__.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/attachment.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/basemodel.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/api.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/batch.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/connection.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/framework.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/plan.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/qaseconfig.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/report.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/run.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/testops.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/relation.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/result.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/run.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/runtime.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/step.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/__init__.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/db.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/network.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/sleep.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/__init__.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/core.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/report.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/testops.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/utils.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/validators/base.py +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/SOURCES.txt +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/dependency_links.txt +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/requires.txt +0 -0
- {qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.6
|
|
4
4
|
Summary: A library for Qase TestOps and Qase Report
|
|
5
5
|
Author-email: Qase Team <support@qase.io>
|
|
6
6
|
Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qase-python-commons"
|
|
7
|
-
version = "3.2.
|
|
7
|
+
version = "3.2.6"
|
|
8
8
|
description = "A library for Qase TestOps and Qase Report"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{name = "Qase Team", email = "support@qase.io"}]
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/api_v2_client.py
RENAMED
|
@@ -77,8 +77,7 @@ class ApiV2Client(ApiV1Client):
|
|
|
77
77
|
title=result.get_title(),
|
|
78
78
|
signature=result.signature,
|
|
79
79
|
testops_id=result.get_testops_id(),
|
|
80
|
-
execution=ResultExecution(
|
|
81
|
-
status=result.execution.status, duration=result.execution.duration,
|
|
80
|
+
execution=ResultExecution(status=result.execution.status, duration=result.execution.duration,
|
|
82
81
|
stacktrace=result.execution.stacktrace, thread=result.execution.thread),
|
|
83
82
|
fields=ResultCreateFields.from_dict(result.fields),
|
|
84
83
|
attachments=[attach.hash for attach in attached],
|
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
|
|
3
1
|
import os
|
|
2
|
+
import datetime
|
|
3
|
+
import threading
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class Logger:
|
|
7
|
+
_log_file = None
|
|
8
|
+
|
|
7
9
|
def __init__(self, debug: bool = False, prefix: str = '', dir: str = os.path.join('.', 'logs')) -> None:
|
|
8
10
|
self.debug = debug
|
|
9
11
|
if self.debug:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
if Logger._log_file is None:
|
|
13
|
+
timestamp = self._get_timestamp()
|
|
14
|
+
filename = f'{prefix}_{timestamp}.log'
|
|
15
|
+
if not os.path.exists(dir):
|
|
16
|
+
os.makedirs(dir)
|
|
17
|
+
Logger._log_file = os.path.join(dir, filename)
|
|
18
|
+
|
|
19
|
+
with open(Logger._log_file, 'a', encoding='utf-8'):
|
|
15
20
|
pass
|
|
16
21
|
|
|
22
|
+
self.lock = threading.Lock()
|
|
23
|
+
|
|
17
24
|
def log(self, message: str, level: str = 'info'):
|
|
18
25
|
time_str = self._get_timestamp("%H:%M:%S")
|
|
19
26
|
log = f"[Qase][{time_str}][{level}] {message}\n"
|
|
20
27
|
print(log)
|
|
21
28
|
if self.debug:
|
|
22
|
-
with
|
|
23
|
-
|
|
29
|
+
with self.lock:
|
|
30
|
+
with open(Logger._log_file, 'a', encoding='utf-8') as f:
|
|
31
|
+
f.write(log)
|
|
24
32
|
|
|
25
33
|
def log_debug(self, message: str):
|
|
26
34
|
if self.debug:
|
|
27
35
|
self.log(message, 'debug')
|
|
28
36
|
|
|
29
37
|
@staticmethod
|
|
30
|
-
def _get_timestamp(fmt: str = "%Y%m%
|
|
38
|
+
def _get_timestamp(fmt: str = "%Y%m%d"):
|
|
31
39
|
now = datetime.datetime.now()
|
|
32
40
|
return now.strftime(fmt)
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: qase-python-commons
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.6
|
|
4
4
|
Summary: A library for Qase TestOps and Qase Report
|
|
5
5
|
Author-email: Qase Team <support@qase.io>
|
|
6
6
|
Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/api_v1_client.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/client/base_api_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/exceptions/reporter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/attachment.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/basemodel.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/api.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/batch.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/connection.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/framework.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/plan.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/qaseconfig.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/report.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/run.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/models/config/testops.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/profilers/network.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/report.py
RENAMED
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase/commons/reporters/testops.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{qase_python_commons-3.2.4 → qase_python_commons-3.2.6}/src/qase_python_commons.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|