Skip to content

Commit

Permalink
Get pytest metadata from stash object (fix numirias#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
eskerda committed Jun 12, 2023
1 parent c6f0bc9 commit 7148619
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytest_jsonreport/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import time
import warnings

from pytest_metadata.plugin import metadata_key
import pytest
import _pytest.hookspec

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7148619

Please sign in to comment.