Skip to content

Commit e4e900c

Browse files
committed
Add custom ci mark to skip non-primary tests
1 parent f127f95 commit e4e900c

12 files changed

+48
-6
lines changed

array_api_tests/test_array_object.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from . import xps
1515
from .typing import DataType, Param, Scalar, ScalarType, Shape
1616

17+
pytestmark = pytest.mark.ci
18+
1719

1820
def scalar_objects(dtype: DataType, shape: Shape) -> st.SearchStrategy[List[Scalar]]:
1921
"""Generates scalars or nested sequences which are valid for xp.asarray()"""

array_api_tests/test_constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from ._array_module import mod as xp
88
from .typing import Array
99

10+
pytestmark = pytest.mark.ci
11+
1012

1113
def assert_scalar_float(name: str, c: Any):
1214
assert isinstance(c, SupportsFloat), f"{name}={c!r} does not look like a float"

array_api_tests/test_creation_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import math
2+
import pytest
23
from itertools import count
34
from typing import Iterator, NamedTuple, Union
45

@@ -14,6 +15,8 @@
1415
from . import xps
1516
from .typing import DataType, Scalar
1617

18+
pytestmark = pytest.mark.ci
19+
1720

1821
class frange(NamedTuple):
1922
start: float

array_api_tests/test_linalg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
from . import _array_module
3636
from ._array_module import linalg
3737

38+
pytestmark = pytest.mark.ci
39+
40+
3841

3942
# Standin strategy for not yet implemented tests
4043
todo = none()

array_api_tests/test_manipulation_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from . import xps
1515
from .typing import Array, Shape
1616

17+
pytestmark = pytest.mark.ci
18+
1719
MAX_SIDE = hh.MAX_ARRAY_SIZE // 64
1820
MAX_DIMS = min(hh.MAX_ARRAY_SIZE // MAX_SIDE, 32) # NumPy only supports up to 32 dims
1921

array_api_tests/test_operators_and_elementwise_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from .algos import broadcast_shapes
2929
from .typing import Array, DataType, Param, Scalar
3030

31+
pytestmark = pytest.mark.ci
32+
3133
# When appropiate, this module tests operators alongside their respective
3234
# elementwise methods. We do this by parametrizing a generalised test method
3335
# with every relevant method and operator.

array_api_tests/test_searching_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from hypothesis import given
23
from hypothesis import strategies as st
34

@@ -9,6 +10,8 @@
910
from . import xps
1011
from .algos import broadcast_shapes
1112

13+
pytestmark = pytest.mark.ci
14+
1215

1316
@given(
1417
x=xps.arrays(

array_api_tests/test_set_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TODO: disable if opted out, refactor things
22
import math
3+
import pytest
34
from collections import Counter, defaultdict
45

56
from hypothesis import assume, given
@@ -11,6 +12,8 @@
1112
from . import shape_helpers as sh
1213
from . import xps
1314

15+
pytestmark = pytest.mark.ci
16+
1417

1518
@given(xps.arrays(dtype=xps.scalar_dtypes(), shape=hh.shapes(min_side=1)))
1619
def test_unique_all(x):

array_api_tests/test_sorting_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import math
2+
import pytest
23
from typing import Set
34

45
from hypothesis import given
@@ -13,6 +14,8 @@
1314
from . import xps
1415
from .typing import Scalar, Shape
1516

17+
pytestmark = pytest.mark.ci
18+
1619

1720
def assert_scalar_in_set(
1821
func_name: str,

array_api_tests/test_statistical_functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import math
2+
import pytest
23
from typing import Optional
34

45
from hypothesis import assume, given
@@ -13,6 +14,8 @@
1314
from . import xps
1415
from .typing import DataType
1516

17+
pytestmark = pytest.mark.ci
18+
1619

1720
def kwarg_dtypes(dtype: DataType) -> st.SearchStrategy[Optional[DataType]]:
1821
dtypes = [d2 for d1, d2 in dh.promotion_table if d1 == dtype]

0 commit comments

Comments
 (0)