Repository navigation
Skip testing negative integer exponents for pow related functions - #66
Merged
Merged
Conversation
Out-of-scope scenario
asmeurer
reviewed
Jan 8, 2022
| assume(right >= 0) | ||
| else: | ||
| if dh.is_int_dtype(right.dtype): | ||
| assume(xp.all(right >= 0)) |
Member
There was a problem hiding this comment.
I guess if hypothesis doesn't complain then we shouldn't worry about it, but wouldn't this filter a large fraction of examples?
Member
Author
There was a problem hiding this comment.
Yeah, Hypothesis hasn't complained yet here heh. assume is very useful as otherwise I'd need some mechanism to inject a test-specific strategy, but I'll mull over on if I can figure out a nicer (more performative!) solution here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an out-of-scope scenario and thus should not be tested. I introduced testing numeric dtypes in #62 but did not think to do this at the time.