Open carmenbianca opened 1 year ago
Is there any workaround here to get pytest to work on 3.11? We are running into the same issue.
Not that I'm aware of.
Does it work outside of poetry run?
I am not using poetry but I'm having this issue.
What commands do you use and do you have a example reproducer?
poetry run
in my example is optional. You can run pytest without poetry run
just the same, and the result is the same.
This seems to be the problematic line of code: https://github.com/pytest-dev/pytest-cov/blob/f7fced579e36b72b57e14768026467e4c4511a40/src/pytest_cov/engine.py#L234
It looks like you need coverage>=6.3
to fix this issue.
Summary
When using pytest-cov using Python 3.11, pytest quietly fails with returncode 1.
Expected vs actual result
Expected:
pytest --cov=module
works.Actual result:
pytest --cov=module
silently fails.Reproducer
Versions
Output of relevant packages
pip list
,python --version
,pytest --version
etc.Config
Include your
tox.ini
,pytest.ini
,.coveragerc
,setup.cfg
or any relevant configuration.Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
Can be reproduced on this commit: https://github.com/fsfe/reuse-tool/pull/600/commits/1248c125cb90ea599040c129fbe2e89a09f72ec7
Steps to reproduce: