BUG: Fixes #1795 sphzone selection regression#1818
BUG: Fixes #1795 sphzone selection regression#1818tylerjereddy wants to merge 2 commits intodevelopfrom
Conversation
|
Looks like the new test fails in Python 2.7 but not 3.6; will have to investigate. |
|
This is related to zip() but actually isn't repaired by using the six.moves.zip. I basically need a way to feed in parametrized arguments from subclassed test objects -- wasn't working when I tried to to do this early -- maybe I'll have another go tonight. Basically, there are two test classes that inherit from This basically means that 549 @pytest.mark.parametrize('input_val, expected',
550 list(zip(methods,
551 sphzone_expected)))
552 def test_spherical_zone(self, u, input_val, expected):Should have different values of |
|
@tylerjereddy I don't think that's easily fixed. You could just redefine the test in each subclass |
…ly handle regression in Issue #1795.
|
|
||
| @pytest.mark.parametrize('input_val, expected', | ||
| zip(BaseDistanceSelection.methods, | ||
| [25, 31, 33, 25])) |
There was a problem hiding this comment.
So this means that kdtree and non-kdtree are returning a different result for periodic=True
There was a problem hiding this comment.
Does that mean more changes are needed or we need to think about this a bit more?
|
Ok, I've redefined the pertinent test in each subclass with appropriate expected values. Locally, the tests now pass in Python 2.7 & 3.6 -- we'll see what the CI says. The code duplication is perhaps a little ugly, but prettier solutions were proving problematic (and time consuming). A fixture or something probably could be used for concision. |
richardjgowers
left a comment
There was a problem hiding this comment.
I'm looking into this myself, I think this fix is fine, but I want to double check it
|
@tylerjereddy I think you will have to look at the merge. This might also kick appveyor to actually run the tests. |
|
@orbeckst Noted / put reminder on my calendar to take a look soon-ish |
|
The test file has been refactored pretty substantially, I think there have been a lot distance-based operation changes lately -- has the linked issue been confirmed on latest develop branch? I'll have to check that next I guess. |
|
#1795 is now fixed |
Fixes #1795
Supersedes attempted fix in #1806 based on feedback from @richardjgowers. The corresponding unit test now only crudely checks for regression of
sphzonebehavior as it relates to the reported issue, rather than making any claims about the geometric correctness of the selection.I verified that the script I used for git bisecting the regression is happy with this fix & that the regression test (modified from the original unit test) does fail alongside the bisection script without the application of the fix used in this PR.
We'll see what the CI says. More detailed & correct handling of pbc & wrapping issues are delayed to future efforts, as discussed in the linked issue / PR above.