test: Make fail_backend markers add pytest.mark.xfail and remove fail_jax marker on percentile tests #1730
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.
Description
Resolves #1729
To get
xfail_strict = true
to work properly inpyproject.toml
it needs to be located under[tool.pytest.ini_options]
as is noted in thepytest
docs:Once that has been moved then to deal with the issue of
pytest.xfail
skipping tests instead of running them and checking results likepytest.mark.xfail
(c.f. Issue #1729 for discussion on this), addpytest.mark.xfail
to the request node for thebackend
extra that has thefail_{backend}
marker already placed on it. This marker placing ensures that placing afail_backend
marker on a test will fail the test if that backend does NOT fail — which was the point of PR #1702.With that working, the
fail_jax
markers can be removed from thepercentile
tests intest_tensor.py
and remove theonly_jax
tests added for them now thatjax
v0.2.26
is out and brings with it a fix for jax-ml/jax#8513. Also, remove thefail_pytorch
marker fortest_ND_gather
(thanks to it being found by the now workingxfail
strict).An update to the lower bounds for the
jax
extra insetup.py
pyhf/setup.py
Line 10 in 43c1567
and the lower bound constraints in
pyhf/tests/constraints.txt
Lines 17 to 22 in 43c1567
is not needed as (interestingly) these lower bounds are old enough to have the desired behavior that the lastest versions have (again), and so can be left unchanged. So for the time being the
scipy
lower bound increase that is currently injax
won't pose an issue for theconstraints.txt
file installs for a while (c.f. jax-ml/jax#8871).Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: