pytest-json-ctrf 0.5.1__tar.gz → 0.5.3__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.
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/PKG-INFO +2 -1
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/README.md +1 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/TestObject.py +1 -4
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/main.py +2 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pyproject.toml +1 -7
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/PKG-INFO +2 -1
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/tests/test_plugin.py +17 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/BaseMetadataReport.py +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/CommonTestReportPlugin.py +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/Report.py +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/ctrf/__init__.py +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/SOURCES.txt +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/dependency_links.txt +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/entry_points.txt +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/requires.txt +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/top_level.txt +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/setup.cfg +0 -0
- {pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/tests/test_example.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-json-ctrf
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary: Pytest plugin to generate json report in CTRF (Common Test Report Format)
|
|
5
5
|
Author: Oleksii Ostapov
|
|
6
6
|
Project-URL: Infopulse, https://infopulse.com/
|
|
@@ -114,6 +114,7 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
114
114
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
115
115
|
|
|
116
116
|
## Changelog
|
|
117
|
+
- 0.5.3 - fixed issue 6 - @pytest.mark.parametrize will no longer be added to tags to prevent exhausting memory
|
|
117
118
|
- 0.5.1 - added mandatory root object fields: reportFormat, specVersion, generatedBy
|
|
118
119
|
- 0.5.0 - Changed logic of handling parametrized tests. Previously they were marked as retries, now they are reported as separate tests
|
|
119
120
|
- 0.4.1 - Introduced backward compatibility with python 3.8, fixed issues with the time formats
|
|
@@ -99,6 +99,7 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
99
99
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
100
100
|
|
|
101
101
|
## Changelog
|
|
102
|
+
- 0.5.3 - fixed issue 6 - @pytest.mark.parametrize will no longer be added to tags to prevent exhausting memory
|
|
102
103
|
- 0.5.1 - added mandatory root object fields: reportFormat, specVersion, generatedBy
|
|
103
104
|
- 0.5.0 - Changed logic of handling parametrized tests. Previously they were marked as retries, now they are reported as separate tests
|
|
104
105
|
- 0.4.1 - Introduced backward compatibility with python 3.8, fixed issues with the time formats
|
|
@@ -16,7 +16,6 @@ class TestObject:
|
|
|
16
16
|
name: str
|
|
17
17
|
_status: TestStatus
|
|
18
18
|
raw_status: Optional[str]
|
|
19
|
-
duration: int = 0
|
|
20
19
|
start: int
|
|
21
20
|
stop: int
|
|
22
21
|
retries: int
|
|
@@ -33,7 +32,6 @@ class TestObject:
|
|
|
33
32
|
self._status = TestStatus.PENDING
|
|
34
33
|
self._status = self.set_status(report)
|
|
35
34
|
self.raw_status = None
|
|
36
|
-
self.duration = 0
|
|
37
35
|
self.start = 0
|
|
38
36
|
self.stop = 0
|
|
39
37
|
self.retries = 0
|
|
@@ -83,7 +81,6 @@ class TestObject:
|
|
|
83
81
|
self.start = int(report.start * 1000)
|
|
84
82
|
if report.when == "teardown" and self.stop == 0:
|
|
85
83
|
self.stop = int(report.stop * 1000)
|
|
86
|
-
self.duration = self.stop - self.start
|
|
87
84
|
if report.longrepr and len(report.longreprtext) > 0:
|
|
88
85
|
self.trace = report.longreprtext
|
|
89
86
|
if hasattr(report, '_ctrf_metadata'):
|
|
@@ -95,7 +92,7 @@ class TestObject:
|
|
|
95
92
|
'name': self.name,
|
|
96
93
|
'status': self._status.value,
|
|
97
94
|
'raw_status': self.raw_status,
|
|
98
|
-
'duration': self.
|
|
95
|
+
'duration': self.stop - self.start,
|
|
99
96
|
'start': self.start,
|
|
100
97
|
'stop': self.stop,
|
|
101
98
|
'retries': None if self.retries == 1 else self.retries,
|
|
@@ -10,7 +10,7 @@ exclude = [
|
|
|
10
10
|
|
|
11
11
|
[project]
|
|
12
12
|
name = "pytest-json-ctrf"
|
|
13
|
-
version = "0.5.
|
|
13
|
+
version = "0.5.3"
|
|
14
14
|
|
|
15
15
|
dependencies = [
|
|
16
16
|
"pytest>6.0.0",
|
|
@@ -41,9 +41,3 @@ markers = [
|
|
|
41
41
|
|
|
42
42
|
[project.entry-points.pytest11]
|
|
43
43
|
ctrf = "ctrf.main"
|
|
44
|
-
|
|
45
|
-
[tool.uv]
|
|
46
|
-
dev-dependencies = [
|
|
47
|
-
"pytest-xdist>=2.0.0",
|
|
48
|
-
]
|
|
49
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-json-ctrf
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.3
|
|
4
4
|
Summary: Pytest plugin to generate json report in CTRF (Common Test Report Format)
|
|
5
5
|
Author: Oleksii Ostapov
|
|
6
6
|
Project-URL: Infopulse, https://infopulse.com/
|
|
@@ -114,6 +114,7 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
114
114
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
115
115
|
|
|
116
116
|
## Changelog
|
|
117
|
+
- 0.5.3 - fixed issue 6 - @pytest.mark.parametrize will no longer be added to tags to prevent exhausting memory
|
|
117
118
|
- 0.5.1 - added mandatory root object fields: reportFormat, specVersion, generatedBy
|
|
118
119
|
- 0.5.0 - Changed logic of handling parametrized tests. Previously they were marked as retries, now they are reported as separate tests
|
|
119
120
|
- 0.4.1 - Introduced backward compatibility with python 3.8, fixed issues with the time formats
|
|
@@ -89,3 +89,20 @@ def test_any_test_has_timestamps_xdist(ctrf_report_xdist):
|
|
|
89
89
|
assert test.get("start") is not None
|
|
90
90
|
assert test.get("stop") is not None
|
|
91
91
|
assert test.get("duration") is not None
|
|
92
|
+
|
|
93
|
+
def test_parametrize_marker_not_in_tags(pytester: Pytester):
|
|
94
|
+
pytester.makepyfile("""
|
|
95
|
+
import pytest
|
|
96
|
+
|
|
97
|
+
@pytest.mark.parametrize('param', [{'key': 'value', 'data': 'x' * 1000}, {'key': 'other', 'data': 'y' * 1000}], ids=['case1', 'case2'])
|
|
98
|
+
def test_parametrized(param):
|
|
99
|
+
assert True
|
|
100
|
+
""")
|
|
101
|
+
pytester.runpytest("--ctrf", "report.json")
|
|
102
|
+
with open(pytester.path / "report.json") as file:
|
|
103
|
+
report = json.load(file)
|
|
104
|
+
for test in report["results"]["tests"]:
|
|
105
|
+
tags = test.get("tags", [])
|
|
106
|
+
assert all("parametrize" not in tag for tag in tags), (
|
|
107
|
+
f"parametrize marker should not appear in tags, but got: {tags}"
|
|
108
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytest_json_ctrf-0.5.1 → pytest_json_ctrf-0.5.3}/pytest_json_ctrf.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|