-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update python-pytest-json-report to version 1.5.0 / rev 4 via SR 1101889
https://build.opensuse.org/request/show/1101889 by user dgarcia + dimstar_suse - Add pytest-metadata-3.patch to make it compatible with pytest-metadata 3.0.0 gh#numirias/pytest-json-report#90
- Loading branch information
1 parent
d6fc69f
commit 9292b3e
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/p/python-pytest-json-report/pytest-metadata-3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
From db6174c82df854d5e390f09f4018710e7183461e Mon Sep 17 00:00:00 2001 | ||
From: eskerda <[email protected]> | ||
Date: Mon, 12 Jun 2023 16:41:23 +0200 | ||
Subject: [PATCH] Get pytest metadata from stash object (fix #89) | ||
|
||
--- | ||
pytest_jsonreport/plugin.py | 3 ++- | ||
setup.py | 2 +- | ||
2 files changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/pytest_jsonreport/plugin.py b/pytest_jsonreport/plugin.py | ||
index 6ee4ea5..f768d69 100644 | ||
--- a/pytest_jsonreport/plugin.py | ||
+++ b/pytest_jsonreport/plugin.py | ||
@@ -7,6 +7,7 @@ | ||
import time | ||
import warnings | ||
|
||
+from pytest_metadata.plugin import metadata_key | ||
import pytest | ||
import _pytest.hookspec | ||
|
||
@@ -228,7 +229,7 @@ def pytest_sessionfinish(self, session): | ||
duration=time.time() - self._start_time, | ||
exitcode=session.exitstatus, | ||
root=str(session.fspath), | ||
- environment=getattr(self._config, '_metadata', {}), | ||
+ environment=self._config.stash.get(metadata_key, {}), | ||
summary=serialize.make_summary(self._json_tests, **summary_data), | ||
) | ||
if not self._config.option.json_report_summary: | ||
diff --git a/setup.py b/setup.py | ||
index 563fc6d..a60504f 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -26,7 +26,7 @@ | ||
license='MIT', | ||
install_requires=[ | ||
'pytest>=3.8.0', | ||
- 'pytest-metadata', | ||
+ 'pytest-metadata>=3.0.0', | ||
], | ||
entry_points={ | ||
'pytest11': [ |
6 changes: 6 additions & 0 deletions
6
packages/p/python-pytest-json-report/python-pytest-json-report.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Wed Aug 2 06:39:01 UTC 2023 - Daniel Garcia <[email protected]> | ||
|
||
- Add pytest-metadata-3.patch to make it compatible with | ||
pytest-metadata 3.0.0 gh#numirias/pytest-json-report#90 | ||
|
||
------------------------------------------------------------------- | ||
Wed Nov 30 10:54:12 UTC 2022 - Daniel Garcia <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters