Skip to content

BUG: array_api_extra.testing relies on assert statements that get stripped out with PYTHONOPTIMIZE>=1 #1068

Open

Description

@steppi

I noticed this here, scipy/scipy#26512 (comment), when investigating mysterious CI failures in scipy/scipy#26512.

There is a SciPy CI job which sets PYTHONOPTIMIZE=2. Setting PYTHONOPTIMIZE>=1 causes assert statements to be stripped out, causing some of the checks from array_api_extra.testing to not actually be run. To fix this, I think it would suffice to replace the asserts with a helper function which does essentially the same thing. Patch incoming.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions