This may be a feature enhancement or a general query, depending on whether coverage currently supports this use case.
First let me give some background. I typically use pytest and tox to orchestrate my tests, and I typically use pytest-cov plugin to interact with coverage for calculating metrics. Further, I typically structure my projects with one main subfolder named ./src which contains 1 or more sub-folders for each package in my project.
So my issue is, I'd like some way to generate code coverage metrics for any / all sub-packages defined in the ./src folder, ideally without having to name them all by name. So, for example, if I have 3 sub-packages "./src/package1", "./src/package2" and "./src/package3" I'd like to be able to generate code coverage metrics on all 3 sub-projects by just doing something like "pytest --cov=src/*" or something similar, without having to list each project explicitly by name.
The main reason I'm trying to do this is because I'd like to be able to create a template script / config file that I could use across all my projects without having to go through the scripts and look for names of packages and update them manually. Also, when I rename a package or add/remove packages from a project I'd like the scripts to "just work" without having to remember to go back and update the configuration files to reflect the changes.
Any help you can provide would be greatly appreciated.