pytest-json-report
pytest-json-report copied to clipboard
pytest-metadata 3.0.0 breaking "Environment"
https://github.com/pytest-dev/pytest-metadata/issues/70
We use pytest-json-report
and recently found that the "Environement" section of the json reports are always empty.
From release note of pytest-metadata
3.0.0:
Use pytest.stash internally instead of _metadata
It seems pytest-json-report
needs to be updated to cope with pytest-metadata
's breaking change.
Note to anyone stumbling on this issue and waiting for https://github.com/numirias/pytest-json-report/pull/90 getting merged, you can pin pytest-metadata
to the last compatible version on your requirements.txt
.
pytest-metadata==2.0.4
pytest-json-report
I don't have a private pypi server yet, so I've merged the #90 and #91 PRs in my fork and published a temporary package on pypi.
You can use it in requirements.txt
after removing/commenting the original package:
pytest-json-report-wip==1.5.1
Hi @alexandrul, your fix seems to work for Linux + MacOS but not for Windows. I get an empty environment section still.
@andrewsiemer could you provide more info, please?
- OS
- python version (from https://www.python.org/downloads/windows/, I hope)
- the output of
pip freeze
Hi @alexandrul, sorry for the ping, I seemed fix it by updating pytest-metadata
.