-
Notifications
You must be signed in to change notification settings - Fork 63
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
Adapt test_mutating_op_like_(add)mul
to work with scalar mul as well
#1892
Adapt test_mutating_op_like_(add)mul
to work with scalar mul as well
#1892
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1892 +/- ##
==========================================
- Coverage 88.14% 87.79% -0.35%
==========================================
Files 120 120
Lines 30300 30276 -24
==========================================
- Hits 26708 26582 -126
- Misses 3592 3694 +102 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always: thank you very much for working on this, I really appreciate it :-)
Yeah, this target type thing seems more natural. Let me try it out and then come back to this. |
I now came across two places (namely thofma/Hecke.jl#1659 for
SRow
s and oscar-system/Oscar.jl#4271 forRootSpaceElem
s) where we don't have a multiplication between objects, but only scalar multiplication (and correspondingmul!
methods).To make use of the
test_mutating_op_*
functions, we must have a way to disable multiplications between objects. I achieved this in this PR by adding two kwargs, that state if the left respective right factor of some multiplication is a scalar. If this is the case, we only run the tests where the output is aliased with a non-scalar input. This skips all tests where we would multiply two objects (which errors in the above cases) and the ones where we use a scalar type to save the output in (as these don't really make sense anyway and will fallback to the default impl).