Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the configuration file lookup pattern? #598

Open
mtvx opened this issue Jun 15, 2023 · 0 comments
Open

Clarify the configuration file lookup pattern? #598

mtvx opened this issue Jun 15, 2023 · 0 comments

Comments

@mtvx
Copy link

mtvx commented Jun 15, 2023

So this may be silly, sorry if it is, but I don't understand the docs:

A unfortunate consequence of coverage.py’s history is that .coveragerc is a magic name: it’s the default file but it also means “try to also lookup coverage configuration in tox.ini or setup.cfg”.

So, if it first attempts to find .coveragerc and then falls back to tox.ini/setup.cfg...

In practical terms this means that if you have your coverage configuration in tox.ini or setup.cfg it is paramount that you also use --cov-config=tox.ini or --cov-config=setup.cfg.

...then why is it necessary to explicitly provide the configuration file? It would be found anyway.

You might not be affected but it’s unlikely that you won’t ever use chdir in a test.

How is this related to the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant