Skip to content

gh-1147: Create xp_no_jax#1148

Merged
connoraird merged 2 commits into
mainfrom
connor/issue-1147
Jun 30, 2026
Merged

gh-1147: Create xp_no_jax#1148
connoraird merged 2 commits into
mainfrom
connor/issue-1147

Conversation

@connoraird

Copy link
Copy Markdown
Contributor

Description

Add xp_no_jax to replace xpb when used as xp excluding JAX

Closes: #1147

Checks

  • Is your code passing linting?
  • Is your code passing tests?
  • Have you added additional tests (if required)?
  • Have you modified/extended the documentation (if required)?
  • Have you added a one-liner changelog entry above (if required)?

@connoraird connoraird self-assigned this Jun 23, 2026
@connoraird connoraird added bug Something isn't working array-api Work is related to the Array API labels Jun 23, 2026
@connoraird connoraird requested a review from paddyroddy June 23, 2026 14:50
@ntessore

ntessore commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Isn't this much cleaner handled by a skip at test level instead of changing the fixture?

@paddyroddy paddyroddy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, not sure about the name though

@paddyroddy

Copy link
Copy Markdown
Member

Isn't this much cleaner handled by a skip at test level instead of changing the fixture?

I think if we're not careful then that would skip the whole test. We're interested in skipping for certain backends, but still running the test. Could be done in another way potentially though.

@ntessore

Copy link
Copy Markdown
Collaborator

Isn't this much cleaner handled by a skip at test level instead of changing the fixture?

I think if we're not careful then that would skip the whole test. We're interested in skipping for certain backends, but still running the test. Could be done in another way potentially though.

We use this fixture in exactly one test. So we could just do:

def test_cls2cov_no_jax(xpb: ModuleType) -> None:
    if xpb.__name__ == "jax.numpy":
        pytest.skip("test does not work with jax")

    ...

@paddyroddy

Copy link
Copy Markdown
Member

Ah, yes that makes sense. I was thinking of a more complex example modifying xp fixture itself.

@connoraird connoraird merged commit 227fccb into main Jun 30, 2026
12 checks passed
@connoraird connoraird deleted the connor/issue-1147 branch June 30, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

array-api Work is related to the Array API bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xpb used to mean everything but jax

3 participants