Skip to content

Commit

Permalink
test: only run test for specific Numba version
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Jan 3, 2024
1 parent d466d70 commit 843ab99
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/test_2799_numba_ufunc_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
NUMBA_HAS_NEP_50 = packaging.version.parse(
numba.__version__
) >= packaging.version.Version("0.59.0")

NUMBA_OLDER_THAN_58 = packaging.version.parse(
numba.__version__
) < packaging.version.Version("0.58.0")

ak.numba.register_and_check()

Expand All @@ -22,7 +24,7 @@
def test_numba_ufunc_nep_50():
raise NotImplementedError

@numba.vectorize
@numba.vectorize(nopython=True)
def add(x, y):
return x + y

Expand All @@ -37,8 +39,11 @@ def add(x, y):


@pytest.mark.skipif(NUMBA_HAS_NEP_50, reason="Numba has NEP-50 support")
@pytest.mark.skipif(
NUMBA_OLDER_THAN_58, reason="Numba has a known bug with type dispatch for <0.58"
)
def test_numba_ufunc_legacy():
@numba.vectorize
@numba.vectorize(nopython=True)
def add(x, y):
return x + y

Expand Down

0 comments on commit 843ab99

Please sign in to comment.