Comments (4)
Thanks for the report. I'll have a look into it, though I can't come up with an easy solution right now.
from simplecov.
Hi, I've made a fix for this issue but it currently lacks automated tests:
https://github.com/nbogie/simplecov/commit/ec8bd54f9507204440665f51b34ee584d16516f4
In the manual test documented in the above issue, simplecov's at_exit() will be reached with
I'm dubious of the existing approach of doing the reporting work (and of calling exit) from within an at_exit handler. Also, what happens if the report formatter raises an exception, given that it is also generally launched from this handler? Isn't there some other point at which to prepare the report rather than using the at_exit hook? I get that such a callback would likely be framework-dependent.
I've only glanced at the rest of the code; please excuse my ignorance.
Resources:
- https://www.ruby-forum.com/topic/992363
- http://stackoverflow.com/questions/1144066/ruby-at-exit-exit-status
- http://ruby-doc.org/core/classes/Kernel.html#M001431
- #5
from simplecov.
I don't think there is a better way to capture the coverage results than with an at_exit handler - What other way could there be to let simplecov do it's thing when the test suite is finished?
Your commit makes a lot of sense to me, keeping this open so I remember to add tests and pull it in.
from simplecov.
This is included in the new 0.5.4 release, thanks a lot!
from simplecov.
Related Issues (20)
- branch coverage data missing after collating .resultset.json in parallel test HOT 2
- allow skipping (unreachable) branch coverage only HOT 10
- option to disable line warnings with `enable_coverage_for_eval` and rails views HOT 3
- Use of ractors makes coverage non-deterministic HOT 3
- Branch coverage for the files which don't have _spec files
- "Coverage report generated" is being written to the stdout stream
- Default configurations around coverage criteria and minimum coverage
- Minor documentation fix
- [Feature Request] Don't require all branches to be covered twice in ensure-blocks HOT 3
- Support for other Parallel Testing gems
- SimpleCov does not fail for low coverage for parallel_tests when using 1 process
- SimpleCov only reports the last controller test and sets to 0.0% all previous results HOT 1
- False positives for `begin` lines, a constant definition, and some heredoc content
- مشکل <3
- Rails 7.1 update => test coverage drop HOT 6
- Coverage changes after each run HOT 1
- 0.22.0 release is missing on GitHub
- Coverage dropped in Rails 7.1 (fixed) HOT 1
- Bad usability on bigger projects (>1000s files)
- README says SimpleCov.start should be called after SimpleCov.at_fork, is it true? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simplecov.