Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory
python-pytest-json-report
pytest-metadata-3.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pytest-metadata-3.patch of Package python-pytest-json-report
From db6174c82df854d5e390f09f4018710e7183461e Mon Sep 17 00:00:00 2001 From: eskerda <eskerda@gmail.com> 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': [
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor