Skip to content

Commit 7445917

Browse files
committed
Make test functions private
1 parent f0c30d2 commit 7445917

File tree

6 files changed

+11
-19
lines changed

6 files changed

+11
-19
lines changed

docs/api-reference.md

-12
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,3 @@
1515
setdiff1d
1616
sinc
1717
```
18-
19-
## Test tools
20-
21-
```{eval-rst}
22-
.. currentmodule:: array_api_extra.testing
23-
.. autosummary::
24-
:nosignatures:
25-
:toctree: generated
26-
27-
xp_assert_equal
28-
xp_assert_close
29-
```

src/array_api_extra/testing.py renamed to src/array_api_extra/_lib/_testing.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
"""Testing utilities."""
1+
"""
2+
Testing utilities.
23
3-
from ._lib._compat import (
4+
Note that this is private API; don't expect it to be stable.
5+
"""
6+
7+
from ._compat import (
48
array_namespace,
59
is_cupy_namespace,
610
is_pydata_sparse_namespace,
711
is_torch_namespace,
812
)
9-
from ._lib._typing import Array, ModuleType
13+
from ._typing import Array, ModuleType
1014

1115
__all__ = ["xp_assert_close", "xp_assert_equal"]
1216

tests/test_at.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
from array_api_extra import at
1414
from array_api_extra._funcs import _AtOp
15+
from array_api_extra._lib._testing import xp_assert_equal
1516
from array_api_extra._lib._typing import Array, ModuleType
16-
from array_api_extra.testing import xp_assert_equal
1717

1818
from .conftest import Library
1919

tests/test_funcs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
sinc,
1717
)
1818
from array_api_extra._lib._compat import device as get_device
19+
from array_api_extra._lib._testing import xp_assert_close, xp_assert_equal
1920
from array_api_extra._lib._typing import Array, Device, ModuleType
20-
from array_api_extra.testing import xp_assert_close, xp_assert_equal
2121

2222
from .conftest import Library
2323

tests/test_testing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pytest
33

4-
from array_api_extra.testing import xp_assert_close, xp_assert_equal
4+
from array_api_extra._lib._testing import xp_assert_close, xp_assert_equal
55

66
from .conftest import Library
77

tests/test_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import pytest
33

44
from array_api_extra._lib._compat import device as get_device
5+
from array_api_extra._lib._testing import xp_assert_equal
56
from array_api_extra._lib._typing import Array, Device, ModuleType
67
from array_api_extra._lib._utils import in1d
7-
from array_api_extra.testing import xp_assert_equal
88

99
from .conftest import Library
1010

0 commit comments

Comments
 (0)