Possibility to avoid .coverage generation
See original GitHub issueWith this command:
pytest --cov=app --cov-report=xml --junitxml $PYTEST_XML_PATH
I explicitly want to generate an xml file, but a .coverage
file is also generated. It could be nice to have the possibility to don’t generate this file, for instance with a --no-cov-file
(or similar) option.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
The Risks of Coverage-Directed Test Case Generation
Abstract—A number of structural coverage criteria have been proposed to measure the adequacy of testing efforts. In the avionics and other critical systems ......
Read more >Command line usage — Coverage.py 7.0.0 documentation
The original input data files are deleted once they've been combined. If you want to keep those files, use the --keep command-line option....
Read more >The Risks of Coverage-Directed Test Case Generation
Our results yield three key conclusions. First, coverage criteria satisfaction alone can be a poor indication of fault finding effectiveness, ...
Read more >pytest-cov - Read the Docs
This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras: • Subprocess support: you can fork ...
Read more >pytest-cov - PyPI
Support for coverage 4.0. Data file suffixing changed to use coverage's data_suffix=True option (instead of the custom suffixing). Avoid warning about ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Faced with this on read-only filesystem in docker. It is because of root user and fast prototyping and I don’t want root files in my source. I need only run tests and report coverage to stdout.
I don’t see how giving the tool an option that tells it not to leave behind unwanted state is adding responsibilities to the toolkit itself outside of it’s currently stated responsibility. There doesn’t seem to be very strong logic in the reasoning that the responsibility of pytest-cov is to produce a side effect on your filesystem.
The responsibility seems to be to handle code coverage reporting. To assert that file system side effects are an intrinsic artefact of such a responsibility is a fallacy. That is only true if your stated responsibility is to produce coverage reporting that a person may use at some arbitrary point in the future. If that isn’t the case, then it is the side effect itself that represents unnecessary complexity in the grand scheme of things. You’re spending cycles to do something that no one is asking you to do, and then asking others to spend cycles to remove the thing that they didn’t want in the first place. This isn’t at least a code smell to you?
It isn’t a matter of dev tool orchestration - it is about employing a toolkit that is natively compatible with modern delivery pipelines where (ideally) everything is automated and people aren’t really in the mix. If that isn’t where pytest-cov is aiming to sit, then I can understand the reasoning behind the notion that such an option would complicate the tool’s responsibility itself. As it stands now, I had to take a few extra, superfluous steps to ensure that this side effect doesn’t cause issues throughout various phases of my project’s SDLC. If that doesn’t convince you that you have a design problem, then I don’t really know what will =\