-
Notifications
You must be signed in to change notification settings - Fork 57
fix missing codecov for @timeit-defined functions, and add tests for issue 77
#194
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
fix missing codecov for @timeit-defined functions, and add tests for issue 77
#194
Conversation
d1ea511 to
c68902f
Compare
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #194 +/- ##
==========================================
+ Coverage 84.82% 94.60% +9.77%
==========================================
Files 5 6 +1
Lines 323 482 +159
==========================================
+ Hits 274 456 +182
+ Misses 49 26 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@timeit-defined functions no longer have code coverage@timeit-defined functions, and add tests for issue 77
|
Bump :) |
|
With neither this nor master do I see |
|
hm, I only tested the case of a function definition annotated with the macro, can you check that case? |
|
Sorry, I meant that there appears to be another issue ontop of the one this evidently fixes (from the tests). I'm looking into whether we can just do something other than |
|
I think the only way would be to lift the Something like this perhaps, returning the setup and cleanup blocks separately to feed into the tryfinally at the macro level. macro timeit(args...)
expr_or_exprs = timer_expr(__module__, false, args...)
if expr_or_exprs isa Expr
expr_or_exprs
elseif length(expr_or_exprs) == 2
expr_or_exprs[1]
Expr(:tryfinally,
:($(esc(args[end]))),
:($(esc(expr_or_exprs[2])))
)
else
only(expr_or_exprs)
end
end |
|
This appears to work. #196 Would it make sense to bring your tests over to that? |
|
Thanks for the merge from master. I'll leave it a few days to cut a release. |
addresses #164 (comment)
This PR adds tests for code-coverage from
@timeitfunctions (c68902f), and for #77 (92fa0fb) and fixes them by removing line nums then re-inserting the__source__as mentioned in #164 (comment).I did the commits incrementally with failing tests first to demonstrate the issues, so this PR should be squash-merged if it is to be merged.