Skip to content

Commit b1f86a9

Browse files
committed
Remove redundant broadcast_shapes fallback test
1 parent d2b84e2 commit b1f86a9

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

tests/test_funcs.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -501,16 +501,6 @@ def mock_broadcast_shapes(*shapes: tuple[int, ...]) -> tuple[int, ...]:
501501
assert broadcast_shapes((2,), (1,), xp=np) == (99,)
502502
assert calls == [((2,), (1,))]
503503

504-
def test_fallback_for_unknown_sizes(self, monkeypatch: pytest.MonkeyPatch):
505-
def mock_broadcast_shapes(*_shapes: tuple[int, ...]) -> tuple[int, ...]:
506-
msg = "Native delegation should not handle unknown sizes"
507-
raise AssertionError(msg)
508-
509-
monkeypatch.setattr(np, "broadcast_shapes", mock_broadcast_shapes)
510-
511-
assert broadcast_shapes((None,), (1,), xp=np) == (None,)
512-
assert broadcast_shapes((math.nan,), (1,), xp=np) == (None,)
513-
514504
def test_fallback_without_xp(self, monkeypatch: pytest.MonkeyPatch):
515505
def mock_broadcast_shapes(*_shapes: tuple[int, ...]) -> tuple[int, ...]:
516506
msg = "Native delegation should not be used without xp"

0 commit comments

Comments
 (0)