pytest-json-ctrf 0.6.1__tar.gz → 0.6.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.6.1/pytest_json_ctrf.egg-info → pytest_json_ctrf-0.6.3}/PKG-INFO +9 -3
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/README.md +6 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/TestObject.py +9 -2
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pyproject.toml +4 -3
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3/pytest_json_ctrf.egg-info}/PKG-INFO +9 -3
- pytest_json_ctrf-0.6.3/pytest_json_ctrf.egg-info/requires.txt +1 -0
- pytest_json_ctrf-0.6.1/pytest_json_ctrf.egg-info/requires.txt +0 -1
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/LICENSE +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/MANIFEST.in +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/BaseMetadataReport.py +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/CommonTestReportPlugin.py +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/Report.py +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/__init__.py +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/ctrf/main.py +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/SOURCES.txt +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/dependency_links.txt +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/entry_points.txt +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/top_level.txt +0 -0
- {pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-json-ctrf
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Pytest plugin to generate json report in CTRF (Common Test Report Format)
|
|
5
5
|
Author: Oleksii Ostapov
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,10 +9,10 @@ Project-URL: Homepage, https://github.com/infopulse/pytest-common-test-report-js
|
|
|
9
9
|
Classifier: Framework :: Pytest
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: pytest
|
|
15
|
+
Requires-Dist: pytest>=7.4
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
18
18
|
# CTRF for pytest
|
|
@@ -32,6 +32,8 @@ Do not worry if report in GitHub does not appear immediately. It takes some time
|
|
|
32
32
|
|
|
33
33
|
## Installation
|
|
34
34
|
|
|
35
|
+
Requires Python 3.9+ and pytest 7.4+.
|
|
36
|
+
|
|
35
37
|
```bash
|
|
36
38
|
pip install pytest-json-ctrf
|
|
37
39
|
```
|
|
@@ -130,6 +132,10 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
130
132
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
131
133
|
|
|
132
134
|
## Changelog
|
|
135
|
+
- 0.6.3 - fixed issue 7 - test and retry attempt `duration` is the sum of pytest's monotonic phase durations, so it stays correct when a time-travel library such as time-machine moves the wall clock between tests
|
|
136
|
+
- `start` and `stop` are still wall-clock timestamps, so `duration` can differ from `stop - start`
|
|
137
|
+
- time between phases (report hooks, failure formatting) is no longer counted
|
|
138
|
+
- 0.6.2 - minimum versions are now pytest 7.4 and Python 3.9 (drops Python 3.8). pytest 6.x failed at startup, even without `--ctrf`; 7.0–7.2 failed when `--ctrf` was used; 7.3 worked, but reported `pytest.fail(..., pytrace=False)` messages without the `Failed: ` prefix
|
|
133
139
|
- 0.6.1 - proper license added to the package to fix build pipeline warnings
|
|
134
140
|
- 0.6.0 - fixed issue 12 - report now validates against the CTRF schema. Thanks to [@jamesarosen](https://github.com/jamesarosen) for the detailed report!
|
|
135
141
|
- `filePath`, `rawStatus` and integer `buildNumber`; environment fields are added only when their variables are set (no defaults), plus `osPlatform`, `osRelease`, `osVersion` and `type` (`CTRF_TEST_TYPE`)
|
|
@@ -15,6 +15,8 @@ Do not worry if report in GitHub does not appear immediately. It takes some time
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
+
Requires Python 3.9+ and pytest 7.4+.
|
|
19
|
+
|
|
18
20
|
```bash
|
|
19
21
|
pip install pytest-json-ctrf
|
|
20
22
|
```
|
|
@@ -113,6 +115,10 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
113
115
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
114
116
|
|
|
115
117
|
## Changelog
|
|
118
|
+
- 0.6.3 - fixed issue 7 - test and retry attempt `duration` is the sum of pytest's monotonic phase durations, so it stays correct when a time-travel library such as time-machine moves the wall clock between tests
|
|
119
|
+
- `start` and `stop` are still wall-clock timestamps, so `duration` can differ from `stop - start`
|
|
120
|
+
- time between phases (report hooks, failure formatting) is no longer counted
|
|
121
|
+
- 0.6.2 - minimum versions are now pytest 7.4 and Python 3.9 (drops Python 3.8). pytest 6.x failed at startup, even without `--ctrf`; 7.0–7.2 failed when `--ctrf` was used; 7.3 worked, but reported `pytest.fail(..., pytrace=False)` messages without the `Failed: ` prefix
|
|
116
122
|
- 0.6.1 - proper license added to the package to fix build pipeline warnings
|
|
117
123
|
- 0.6.0 - fixed issue 12 - report now validates against the CTRF schema. Thanks to [@jamesarosen](https://github.com/jamesarosen) for the detailed report!
|
|
118
124
|
- `filePath`, `rawStatus` and integer `buildNumber`; environment fields are added only when their variables are set (no defaults), plus `osPlatform`, `osRelease`, `osVersion` and `type` (`CTRF_TEST_TYPE`)
|
|
@@ -18,6 +18,7 @@ class TestObject:
|
|
|
18
18
|
raw_status: Optional[str]
|
|
19
19
|
start: int
|
|
20
20
|
stop: int
|
|
21
|
+
_duration_s: float
|
|
21
22
|
retries: int
|
|
22
23
|
message: Optional[str]
|
|
23
24
|
|
|
@@ -48,6 +49,7 @@ class TestObject:
|
|
|
48
49
|
self.trace = None
|
|
49
50
|
self.start = 0
|
|
50
51
|
self.stop = 0
|
|
52
|
+
self._duration_s = 0.0
|
|
51
53
|
self._setup_seen = False
|
|
52
54
|
|
|
53
55
|
@staticmethod
|
|
@@ -73,7 +75,7 @@ class TestObject:
|
|
|
73
75
|
attempt = {
|
|
74
76
|
'attempt': len(self.retry_attempts) + 1,
|
|
75
77
|
'status': self._status.value,
|
|
76
|
-
'duration':
|
|
78
|
+
'duration': round(self._duration_s * 1000),
|
|
77
79
|
'start': self.start,
|
|
78
80
|
'stop': self.stop,
|
|
79
81
|
'message': self.message,
|
|
@@ -133,6 +135,11 @@ class TestObject:
|
|
|
133
135
|
self._finish_attempt()
|
|
134
136
|
self._setup_seen = True
|
|
135
137
|
self.start = int(report.start * 1000)
|
|
138
|
+
# report.duration is monotonic, unlike the wall-clock start/stop.
|
|
139
|
+
# SubtestReport (pytest>=9) and pytest-subtests' SubTestReport carry a context;
|
|
140
|
+
# their time is already counted in the parent test's call phase
|
|
141
|
+
if not hasattr(report, 'context'):
|
|
142
|
+
self._duration_s += report.duration
|
|
136
143
|
self.set_status(report)
|
|
137
144
|
if report.when == "teardown":
|
|
138
145
|
self.stop = int(report.stop * 1000)
|
|
@@ -146,7 +153,7 @@ class TestObject:
|
|
|
146
153
|
'name': self.name,
|
|
147
154
|
'status': self._status.value,
|
|
148
155
|
'rawStatus': self.raw_status,
|
|
149
|
-
'duration': self.
|
|
156
|
+
'duration': round(self._duration_s * 1000),
|
|
150
157
|
'start': self.start,
|
|
151
158
|
'stop': self.stop,
|
|
152
159
|
'suite': self.suite,
|
|
@@ -10,10 +10,11 @@ exclude = [
|
|
|
10
10
|
|
|
11
11
|
[project]
|
|
12
12
|
name = "pytest-json-ctrf"
|
|
13
|
-
version = "0.6.
|
|
13
|
+
version = "0.6.3"
|
|
14
14
|
|
|
15
|
+
# minimum pytest and Python versions: keep in sync with .github/workflows/deploy.yml and the README
|
|
15
16
|
dependencies = [
|
|
16
|
-
"pytest
|
|
17
|
+
"pytest>=7.4",
|
|
17
18
|
]
|
|
18
19
|
|
|
19
20
|
authors = [
|
|
@@ -22,7 +23,7 @@ authors = [
|
|
|
22
23
|
description = "Pytest plugin to generate json report in CTRF (Common Test Report Format)"
|
|
23
24
|
readme = "README.md"
|
|
24
25
|
license = "MIT"
|
|
25
|
-
requires-python = ">=3.
|
|
26
|
+
requires-python = ">=3.9"
|
|
26
27
|
classifiers = [
|
|
27
28
|
"Framework :: Pytest",
|
|
28
29
|
"Programming Language :: Python :: 3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-json-ctrf
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.3
|
|
4
4
|
Summary: Pytest plugin to generate json report in CTRF (Common Test Report Format)
|
|
5
5
|
Author: Oleksii Ostapov
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,10 +9,10 @@ Project-URL: Homepage, https://github.com/infopulse/pytest-common-test-report-js
|
|
|
9
9
|
Classifier: Framework :: Pytest
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: pytest
|
|
15
|
+
Requires-Dist: pytest>=7.4
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
18
18
|
# CTRF for pytest
|
|
@@ -32,6 +32,8 @@ Do not worry if report in GitHub does not appear immediately. It takes some time
|
|
|
32
32
|
|
|
33
33
|
## Installation
|
|
34
34
|
|
|
35
|
+
Requires Python 3.9+ and pytest 7.4+.
|
|
36
|
+
|
|
35
37
|
```bash
|
|
36
38
|
pip install pytest-json-ctrf
|
|
37
39
|
```
|
|
@@ -130,6 +132,10 @@ The `pytest_runtest_logreport` hook in the controller node is used to collect th
|
|
|
130
132
|
- https://github.com/infopulse/Playwright-course-python -> The report will be used in the demo project as +1 report option
|
|
131
133
|
|
|
132
134
|
## Changelog
|
|
135
|
+
- 0.6.3 - fixed issue 7 - test and retry attempt `duration` is the sum of pytest's monotonic phase durations, so it stays correct when a time-travel library such as time-machine moves the wall clock between tests
|
|
136
|
+
- `start` and `stop` are still wall-clock timestamps, so `duration` can differ from `stop - start`
|
|
137
|
+
- time between phases (report hooks, failure formatting) is no longer counted
|
|
138
|
+
- 0.6.2 - minimum versions are now pytest 7.4 and Python 3.9 (drops Python 3.8). pytest 6.x failed at startup, even without `--ctrf`; 7.0–7.2 failed when `--ctrf` was used; 7.3 worked, but reported `pytest.fail(..., pytrace=False)` messages without the `Failed: ` prefix
|
|
133
139
|
- 0.6.1 - proper license added to the package to fix build pipeline warnings
|
|
134
140
|
- 0.6.0 - fixed issue 12 - report now validates against the CTRF schema. Thanks to [@jamesarosen](https://github.com/jamesarosen) for the detailed report!
|
|
135
141
|
- `filePath`, `rawStatus` and integer `buildNumber`; environment fields are added only when their variables are set (no defaults), plus `osPlatform`, `osRelease`, `osVersion` and `type` (`CTRF_TEST_TYPE`)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pytest>=7.4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pytest>6.0.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytest_json_ctrf-0.6.1 → pytest_json_ctrf-0.6.3}/pytest_json_ctrf.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|