Repository navigation
Conversation
|
OK, now I see the problem: the broadcasting really is going wrong because the tests assume the input is 1-dimensional. E.g., one has to replace I haven't checked everything (too late here in the UK), but my hope now is that this is a red herring. |
|
Would it make sense to parametrize the tests to make sure they run in say 1, 2, and 3D? |
|
@astrofrog - in principle, one could add higher-D, but even with my 1-D example there are already 2-D tests, and I don't do anything fancy, so my feeling is that this was really a red herring due to @eteq not having looked quite carefully enough where in the tests assumptions were made about dimensionality, and that thus we'd just be checking numpy broadcasting... |
|
@mhvk - I think we do want to have actual tests that are n-D, because even if the current functionality is fine, future additions may not be. I know that's where almost all the problems that have sneaked into releases have come from (i.e., it works in 1d but not n-d). I'll try re-working this branch to parameterize the tests to work in different dimensions. |
|
@eteq - it be better off checking that things work at a higher level, e.g., using the example mentioned in #5364. (Indeed, this was something I had meant to do for this whole series -- first at least make it possible to do multi-d properly, and then shake out any remaining bugs by adding multi-D examples to the transformation chain.) But obviously it is not like it hurts to do it here too! It just will need a bit of thought (I would actually recommend just adding a few explicit multi-d tests rather than parametrize, but it is obviously up to you). |
|
I'd like to revisit the test organization and coverage in astropy coordinates, and with that I think it does make sense to have fixtures that test scalar, 1d, and nd arrays in some contexts. So, I'd suggest closing this PR and deferring to #6577 |
|
Based on the seeming agreement on @adrn's suggestion above, I'm closing this. Please reopen if I misunderstood. |
This changes the tests for the arithmetic added in #5301 to be 2D for everything. This is currently erroring on my local machine, so initially this PR is just a test to see if that holds up for travis (as @mhvk reported not seeing these errors).
If travis passes this can probably be closed, although I might end up editing it into a more thorough regression test. On the other hand, if travis fails like I see locally, this is a bug report 😉.