Skip to content

Commit c2ba34e

Browse files
committed
Rename xptests back to array_api_tests
1 parent f7d2ce8 commit c2ba34e

File tree

89 files changed

+30
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+30
-30
lines changed

.github/workflows/numpy.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ jobs:
2929
cat << EOF >> xfails.txt
3030
3131
# https://github.com/numpy/numpy/issues/18881
32-
xptests/test_creation_functions.py::test_linspace
32+
array_api_tests/test_creation_functions.py::test_linspace
3333
# einsum is not yet completed in the spec
34-
xptests/test_signatures.py::test_has_names[einsum]
34+
array_api_tests/test_signatures.py::test_has_names[einsum]
3535
# dlpack support is not yet implemented in NumPy
3636
# See https://github.com/numpy/numpy/pull/19083
37-
xptests/test_signatures.py::test_function_positional_args[__dlpack__]
38-
xptests/test_signatures.py::test_function_positional_args[__dlpack_device__]
39-
xptests/test_signatures.py::test_function_positional_args[from_dlpack]
40-
xptests/test_signatures.py::test_function_positional_args[to_device]
41-
xptests/test_signatures.py::test_function_keyword_only_args[__dlpack__]
37+
array_api_tests/test_signatures.py::test_function_positional_args[__dlpack__]
38+
array_api_tests/test_signatures.py::test_function_positional_args[__dlpack_device__]
39+
array_api_tests/test_signatures.py::test_function_positional_args[from_dlpack]
40+
array_api_tests/test_signatures.py::test_function_positional_args[to_device]
41+
array_api_tests/test_signatures.py::test_function_keyword_only_args[__dlpack__]
4242
# floor_divide has an issue related to https://github.com/data-apis/array-api/issues/264
43-
xptests/test_elementwise_functions.py::test_floor_divide
43+
array_api_tests/test_elementwise_functions.py::test_floor_divide
4444
# mesgrid doesn't return all arrays as the promoted dtype
45-
xptests/test_type_promotion.py::test_meshgrid
45+
array_api_tests/test_type_promotion.py::test_meshgrid
4646
# https://github.com/numpy/numpy/pull/20066#issuecomment-947056094
47-
xptests/test_type_promotion.py::test_where
47+
array_api_tests/test_type_promotion.py::test_where
4848
# shape mismatches are not handled
49-
xptests/test_type_promotion.py::test_tensordot
49+
array_api_tests/test_type_promotion.py::test_tensordot
5050
5151
EOF
5252

README.md

Lines changed: 7 additions & 7 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

xptests/test_sorting_functions.py renamed to array_api_tests/test_sorting_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from hypothesis import strategies as st
66
from hypothesis.control import assume
77

8-
from xptests.typing import Scalar, ScalarType, Shape
8+
from .typing import Scalar, ScalarType, Shape
99

1010
from . import _array_module as xp
1111
from . import dtype_helpers as dh
File renamed without changes.

conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
from pytest import mark
55
from hypothesis import settings
66

7-
from xptests import _array_module as xp
8-
from xptests._array_module import _UndefinedStub
7+
from array_api_tests import _array_module as xp
8+
from array_api_tests._array_module import _UndefinedStub
99

1010

1111
settings.register_profile('xp_default', deadline=800)
@@ -77,7 +77,7 @@ def xp_has_ext(ext: str) -> bool:
7777
if xfails_path.exists():
7878
with open(xfails_path) as f:
7979
for line in f:
80-
if line.startswith('xptests'):
80+
if line.startswith('array_api_tests'):
8181
id_ = line.strip('\n')
8282
xfail_ids.append(id_)
8383

generate_stubs.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
./generate_stubs.py path/to/clone/of/array-api
99
10-
This will update the stub files in xptests/function_stubs/
10+
This will update the stub files in array_api_tests/function_stubs/
1111
"""
1212
from __future__ import annotations
1313

@@ -218,12 +218,12 @@ def main():
218218
parser.add_argument('-v', '--verbose', help="Print verbose output to the terminal", action='store_true')
219219
args = parser.parse_args()
220220

221-
types_path = os.path.join('xptests', 'function_stubs', '_types.py')
221+
types_path = os.path.join('array_api_tests', 'function_stubs', '_types.py')
222222
if args.write:
223223
with open(types_path, 'w') as f:
224224
f.write(TYPES_HEADER)
225225

226-
special_cases_dir = Path('xptests/special_cases')
226+
special_cases_dir = Path('array_api_tests/special_cases')
227227
special_cases_dir.mkdir(exist_ok=True)
228228
(special_cases_dir / '__init__.py').touch()
229229

@@ -256,7 +256,7 @@ def main():
256256
title += " (Extension)"
257257
else:
258258
py_file = filename.replace('.md', '.py')
259-
py_path = os.path.join('xptests', 'function_stubs', py_file)
259+
py_path = os.path.join('array_api_tests', 'function_stubs', py_file)
260260
module_name = py_file.replace('.py', '')
261261
modules[module_name] = []
262262
if args.verbose:
@@ -342,7 +342,7 @@ def {annotated_sig}:{doc}
342342
if filename == 'elementwise_functions.md':
343343
special_cases = parse_special_cases(text, verbose=args.verbose)
344344
for func in special_cases:
345-
py_path = os.path.join('xptests', 'special_cases', f'test_{func}.py')
345+
py_path = os.path.join('array_api_tests', 'special_cases', f'test_{func}.py')
346346
tests = make_special_case_tests(func, special_cases, sigs)
347347
if tests:
348348
code = SPECIAL_CASES_HEADER.format(func=func) + '\n'.join(tests)
@@ -354,7 +354,7 @@ def {annotated_sig}:{doc}
354354
elif filename == 'array_object.md':
355355
op_special_cases = parse_special_cases(text, verbose=args.verbose)
356356
for func in op_special_cases:
357-
py_path = os.path.join('xptests', 'special_cases', f'test_dunder_{func[2:-2]}.py')
357+
py_path = os.path.join('array_api_tests', 'special_cases', f'test_dunder_{func[2:-2]}.py')
358358
tests = make_special_case_tests(func, op_special_cases, sigs)
359359
if tests:
360360
code = OP_SPECIAL_CASES_HEADER.format(func=func) + '\n'.join(tests)
@@ -368,7 +368,7 @@ def {annotated_sig}:{doc}
368368
iop = f"__i{name}__"
369369
iop_special_cases[iop] = op_special_cases[op]
370370
for func in iop_special_cases:
371-
py_path = os.path.join('xptests', 'special_cases', f'test_dunder_{func[2:-2]}.py')
371+
py_path = os.path.join('array_api_tests', 'special_cases', f'test_dunder_{func[2:-2]}.py')
372372
tests = make_special_case_tests(func, iop_special_cases, sigs)
373373
if tests:
374374
code = IOP_SPECIAL_CASES_HEADER.format(func=func, operator=func[2:-2]) + '\n'.join(tests)
@@ -377,7 +377,7 @@ def {annotated_sig}:{doc}
377377
with open(py_path, 'w') as f:
378378
f.write(code)
379379

380-
init_path = os.path.join('xptests', 'function_stubs', '__init__.py')
380+
init_path = os.path.join('array_api_tests', 'function_stubs', '__init__.py')
381381
if args.write:
382382
with open(init_path, 'w') as f:
383383
f.write(INIT_HEADER)

0 commit comments

Comments
 (0)