Ensure faulty usage is discovered.
(self)
| 102 | _as_pairs(x, 10, as_index=True) |
| 103 | |
| 104 | def test_exceptions(self): |
| 105 | """Ensure faulty usage is discovered.""" |
| 106 | with pytest.raises(ValueError, match="more dimensions than allowed"): |
| 107 | _as_pairs([[[3]]], 10) |
| 108 | with pytest.raises(ValueError, match="could not be broadcast"): |
| 109 | _as_pairs([[1, 2], [3, 4]], 3) |
| 110 | with pytest.raises(ValueError, match="could not be broadcast"): |
| 111 | _as_pairs(np.ones((2, 3)), 3) |
| 112 | |
| 113 | |
| 114 | class TestConditionalShortcuts: |
nothing calls this directly
no test coverage detected