Repository navigation
Conversation
Owner
|
@eteq - I have added tests like these while implementing your other changes, so will close this PR. |
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.
I found two problems in astropy#5301 that I think are most easily explained with regression tests, and that what this PR provides. To summarize the issues:
mulfails if the shape of the representation is not 1d. Some of the others do too, but I think they're all due tomulfailing? Anyway, you can see in the tests @mhvk and maybe you can tell offhand where the problem is?absdoes not give consistent types - sometimes its a Quantity and sometimes a Distance. But in either case right now, it actually yields a numpy array of object type, not a Quantity/Distance with the appropriate shape. I think the desired behavior is always a singleDistance, so that's what the test checks for.The two commits in this PR add tests for each of these problems, although it does not fix them. I can take a shot at trying to fix them if you'd prefer, @mhvk, but I thought you should have a first look in case the fixes are obvious.