-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove xpass cases and turn xpass into failures #7267
Conversation
Hi there @pllim 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃. Everything looks good from my point of view! 👍 If there are any issues with this message, please report them here. |
Looks like I opened a can o' worms. Compiling them here so I can see a pattern. PYTHON_VERSION=3.5 NUMPY_VERSION=1.10 (https://travis-ci.org/astropy/astropy/jobs/350900557)
PYTHON_VERSION=3.5 NUMPY_VERSION=1.11 (https://travis-ci.org/astropy/astropy/jobs/350900558)
Note: PYTHON_VERSION=3.6 NUMPY_VERSION=1.12 (https://travis-ci.org/astropy/astropy/jobs/350900561)
|
astropy/stats/tests/test_funcs.py
Outdated
try: | ||
assert not np.isnan(rslt) | ||
except AssertionError: | ||
pytest.xfail('See #5232') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That PR discussion is really long; maybe add a link to a specific comment that summarizes the expected fail? I don't remember if this particular test is expected to fail only on certain numpy versions or what...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't involved in that discussion and can't follow it completely (it is very long). Is #5232 (comment) close enough? It does seem weird that this test would only xpass
in Numpy 1.11 and nothing else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...it would probably take me half an hour to figure it out reading back through that. Oh well, let's just leave the comment here - at least it is theoretically possible to reconstruct my mental state at the time...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay then. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that comment is right, this problem will auto-disappear in 3.1, since we'll only support numpy >=1.13
That also suggests, though, this should really be a test on numpy version. I don't really want to hold up this supposedly simple PR, but could you add a comment that might well be resolved in later numpy? Please include something like NUMPY_LT_1_13
?? in the comment, so that we'll find it!
@pllim - Shouldn't we cherry-pick back to 2.0.x, doesn't this affect that branch, too? |
@bsipocz , do we care about |
@pllim - Oh, well, you have a valid point there, I agree not to backport. |
Okay. Tests passed. The allowed to fail job that failed is being addressed separately at #7266. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Only two nitpicks, mostly to avoid future hassle.
def test_transforms_diff(sc): | ||
# note that arguably this *should* fail for the no-distance cases: 3D | ||
# information is necessary to truly solve this, hence the xfail | ||
trans = sc.transform_to(PrecessedGeocentric(equinox='B1975')) | ||
assert isinstance(trans.frame, PrecessedGeocentric) | ||
if sc.distance == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ever want to test multi-D arrays, this would fail. How about
if not sc.distance.unit.is_equivalent(u.m):
astropy/stats/tests/test_funcs.py
Outdated
try: | ||
assert not np.isnan(rslt) | ||
except AssertionError: | ||
pytest.xfail('See #5232') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that comment is right, this problem will auto-disappear in 3.1, since we'll only support numpy >=1.13
That also suggests, though, this should really be a test on numpy version. I don't really want to hold up this supposedly simple PR, but could you add a comment that might well be resolved in later numpy? Please include something like NUMPY_LT_1_13
?? in the comment, so that we'll find it!
@@ -955,6 +954,7 @@ def test_one_argument_ufunc_reduce_accumulate(self): | |||
with pytest.raises(ValueError): | |||
np.sin.reduceat(s, i) | |||
|
|||
@pytest.mark.xfail("NUMPY_LT_1_13") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a nice one - the other test method already gives the right failures!
@mhvk , if this looks good to you, please approve. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All OK now. Nice to have this additional robustness. Will merge.
Ah, I just noticed this
|
Remove xpass cases and turn xpass into failures
Fix #7056
Fix #7065
Close #7194