pytest-dev / pytest-cov

Coverage plugin for pytest.
MIT License
1.72k stars 211 forks source link

Enable `pytest-cov[toml]` akin to upstream `coverage[toml]` #553

Closed stdedos closed 1 year ago

stdedos commented 1 year ago

https://github.com/nedbat/coveragepy/issues/664 (+ later fixes)

Signed-off-by: Stavros Ntentos 133706+stdedos@users.noreply.github.com

ofek commented 1 year ago

Related https://github.com/pytest-dev/pytest-cov/pull/508

stdedos commented 1 year ago

@ionelmc all good now? :confused:

ionelmc commented 1 year ago

Yes, yes.

ofek commented 1 year ago

Wait, what's the point of this? We already do that:

https://github.com/pytest-dev/pytest-cov/blob/f7bdfcfe3aae34982a955b8609cd345820f2526e/setup.py#L132-L135

stdedos commented 1 year ago

When I tried to move .coveragerc to pyproject.toml, I was unable to read the configuration.

I assumed that this was a necessary step (and I was going to test if this fixed the issue after a new pypi release).

ofek commented 1 year ago

Without https://github.com/pytest-dev/pytest-cov/pull/508 you need --cov-config=pyproject.toml

stdedos commented 1 year ago

Without https://github.com/pytest-dev/pytest-cov/pull/508 you need --cov-config=pyproject.toml

Oh well 🤦

Good to know; I'll try to check this on my new project sometime.

ionelmc commented 1 year ago

Facepalm.