Skip to content

Update tests for #5301 - #20

Closed
eteq wants to merge 2 commits into
mhvk:representations-more-powerfulfrom
eteq:representations-more-powerful-tests
Closed

eteq wants to merge 2 commits into
mhvk:representations-more-powerfulfrom
eteq:representations-more-powerful-tests

Conversation

@eteq

@eteq eteq commented Oct 27, 2016 •

Copy link
Copy Markdown

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:

  1. mul fails if the shape of the representation is not 1d. Some of the others do too, but I think they're all due to mul failing? Anyway, you can see in the tests @mhvk and maybe you can tell offhand where the problem is?
  2. abs does 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 single Distance, 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.

@mhvk

mhvk commented Oct 27, 2016

Copy link
Copy Markdown
Owner

@eteq - I have added tests like these while implementing your other changes, so will close this PR.

@mhvk mhvk closed this Oct 27, 2016
@eteq
eteq deleted the representations-more-powerful-tests branch October 27, 2016 18:13
mhvk pushed a commit that referenced this pull request Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants