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