Skip to content

Commit f7b8c5f

Browse files
committed
xfail view stuff in test_indexing.py
1 parent 65cf4cf commit f7b8c5f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

torch_np/tests/numpy_tests/core/test_indexing.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def f(a, v):
250250
assert_raises((ValueError, RuntimeError), f, a, [1, 2, 3])
251251
assert_raises((ValueError, RuntimeError), f, a[:1], [1, 2, 3])
252252

253-
@pytest.mark.xfail("torch does not support object dtype")
253+
@pytest.mark.xfail(reason="torch does not support object dtype")
254254
def test_boolean_assignment_needs_api(self):
255255
# See also gh-7666
256256
# This caused a segfault on Python 2 due to the GIL not being
@@ -332,7 +332,7 @@ def test_uncontiguous_subspace_assignment(self):
332332

333333
assert_equal(a, b)
334334

335-
@pytest.mark.xfail("torch does not limit dims to 32")
335+
@pytest.mark.xfail(reason="torch does not limit dims to 32")
336336
def test_too_many_fancy_indices_special_case(self):
337337
# Just documents behaviour, this is a small limitation.
338338
a = np.ones((1,) * 32) # 32 is NPY_MAXDIMS
@@ -390,6 +390,7 @@ def test_trivial_fancy_not_possible(self):
390390
res[3] = -1
391391
assert_array_equal(a, res)
392392

393+
@pytest.mark.xfail(reason="XXX: wrapping view stuff is TBD")
393394
def test_nonbaseclass_values(self):
394395
class SubClass(np.ndarray):
395396
def __array_finalize__(self, old):
@@ -411,6 +412,7 @@ def __array_finalize__(self, old):
411412
a[...] = s
412413
assert_((a == 1).all())
413414

415+
@pytest.mark.xfail(reason="XXX: wrapping view stuff is TBD")
414416
def test_array_like_values(self):
415417
# Similar to the above test, but use a memoryview instead
416418
a = np.zeros((5, 5))
@@ -496,6 +498,7 @@ def test_small_regressions(self):
496498
if HAS_REFCOUNT:
497499
assert_equal(sys.getrefcount(np.dtype(np.intp)), refcount)
498500

501+
@pytest.mark.xfail(reason="XXX: wrapping view stuff is TBD")
499502
def test_unaligned(self):
500503
v = (np.zeros(64, dtype=np.int8) + ord('a'))[1:-7]
501504
d = v.view(np.dtype("S8"))
@@ -603,6 +606,8 @@ def test_too_many_advanced_indices(self, index, num, original_ndim):
603606
with pytest.raises(IndexError):
604607
arr[(index,) * num] = 1.
605608

609+
610+
@pytest.mark.xfail(reason="XXX: wrapping view stuff is TBD")
606611
@pytest.mark.skipif(IS_WASM, reason="no threading")
607612
def test_structured_advanced_indexing(self):
608613
# Test that copyswap(n) used by integer array indexing is threadsafe
@@ -711,6 +716,7 @@ def test_broadcast_subspace(self):
711716
assert_((a[::-1] == v).all())
712717

713718

719+
@pytest.mark.xfail(reason="XXX: wrapping view stuff is TBD")
714720
class TestSubclasses:
715721
def test_basic(self):
716722
# Test that indexing in various ways produces SubClass instances,
@@ -1186,6 +1192,7 @@ def _check_single_index(self, arr, index):
11861192
def _compare_index_result(self, arr, index, mimic_get, no_copy):
11871193
"""Compare mimicked result to indexing result.
11881194
"""
1195+
pytest.xfail("XXX: wrapping view stuff is TBD")
11891196
arr = arr.copy()
11901197
indexed_arr = arr[index]
11911198
assert_array_equal(indexed_arr, mimic_get)

0 commit comments

Comments
 (0)