Skip to content

TST: improve array API test skip decorators #19181

@lucascolley

Description

@lucascolley

Following #19018 's merge, there are still improvements to be made to the array API test skip decorators. Here are two relevant comments pasted from there (with users indicated in braces).


{lucascolley}:

Noting that this PR is related to #18668 (comment) from {rgommers}, which is concerned with the fact that @skip_if_array_api skips for numpy. It seems desirable to reach a point where all tests pass for numpy when the flag is set.

Perhaps we want to have a decorator which skips every backend apart from numpy.

Some notes from {tupui} about @skip_if_array_api:

I had 2 cases in mind which for now are mixed together:

  1. Skip because we know it does not work
  2. Skip because we are ok not running a test and save some CI time

I would be fine separating the 2 use cases or adding some comments to make it more clear that we want to do one or the other

It may be an improvement for @skip_if_array_api_backend to accept multiple backends, or be merged with @skip_if_array_api into one decorator which has all of the needed functionality, perhaps including the option to only run for numpy too.


{rgommers}:

Skip because we are ok not running a test and save some CI time

I've already found this to be a hindrance, it makes it harder to make changes and then run all tests with a single test command. Imho this isn't worth doing for the small-ish gains in test runtime, there are better ways of speeding up the test suite. In addition it's extra boilerplate; so I'd still prefer to simply remove this decorator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    array typesItems related to array API support and input array validation (see gh-18286)maintenanceItems related to regular maintenance tasks

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions