-
Notifications
You must be signed in to change notification settings - Fork 85
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
Collect coverage from doctests too #259
Collect coverage from doctests too #259
Conversation
Signed-off-by: FreezyLemon <[email protected]>
f78275c
to
4f42f27
Compare
Oh, that uncovered a test failure.. I can't reproduce this locally. Any ideas? |
I also can't reproduce this, seems odd to fail there for precision when they're both on Regarding the test failure, Looks like this line fails, test_case(0.3, 1, 0.2999999999999999888977697537484345957636833190918, pmf(1)); where the float is overspecified, playing with the IEEE-745 visualizer
If we're going to specify a lot of precision, we should probably |
It appears #261 that the nightly compiler causes similar effects in other tests as well.
perhaps a lockfile would help here to see what changes across compile version.. I'll have to take a look later. |
All the test failures could be traced to precision differences in the
Perhaps if intrinsic fused multiply-add has regression testing for a larger number of digits then the precision might be better in our scenarios. However, I don't know enough about floating point to be confident if there are places we wouldn't obtain at least 15 digits. EDITS:
|
Not sure, but I think the binary used for coverage gets compiled with some fairly specific compiler options. I think it's possible that there are cases where the same function/operation gets compiled into more floating-point operations than it would on a normal Or it could just be differences from one compiler version to another, I'm not sure. I would not worry too much about it unless the tests fail on normal runs. This is still annoying though. Not sure it's worth the hassle fixing this, the coverage gained by doctests is probably not a lot. Thoughts? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #259 +/- ##
==========================================
+ Coverage 89.49% 93.15% +3.66%
==========================================
Files 50 52 +2
Lines 10851 11531 +680
==========================================
+ Hits 9711 10742 +1031
+ Misses 1140 789 -351 ☔ View full report in Codecov by Sentry. |
The fix/revert for rust-lang/rust#128386 went in, so this should have the same behavior as before. I notice on my local machine that before updating nightly, Thanks for adding these! |
There are a few doctests that cover code which is not tested by separate unit tests.
I hope this change works as-is, the easiest way to test this change is to just open the PR and see what happens.