()
| 34 | |
| 35 | |
| 36 | def test_path_exceptions(): |
| 37 | bad_verts1 = np.arange(12).reshape(4, 3) |
| 38 | with pytest.raises(ValueError, |
| 39 | match=re.escape(f'has shape {bad_verts1.shape}')): |
| 40 | Path(bad_verts1) |
| 41 | |
| 42 | bad_verts2 = np.arange(12).reshape(2, 3, 2) |
| 43 | with pytest.raises(ValueError, |
| 44 | match=re.escape(f'has shape {bad_verts2.shape}')): |
| 45 | Path(bad_verts2) |
| 46 | |
| 47 | good_verts = np.arange(12).reshape(6, 2) |
| 48 | bad_codes = np.arange(2) |
| 49 | msg = re.escape(f"Your vertices have shape {good_verts.shape} " |
| 50 | f"but your codes have shape {bad_codes.shape}") |
| 51 | with pytest.raises(ValueError, match=msg): |
| 52 | Path(good_verts, bad_codes) |
| 53 | |
| 54 | |
| 55 | def test_point_in_path(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…