(self)
| 69 | assert metafunc.cls is None |
| 70 | |
| 71 | def test_parametrize_error(self) -> None: |
| 72 | def func(x, y): |
| 73 | pass |
| 74 | |
| 75 | metafunc = self.Metafunc(func) |
| 76 | metafunc.parametrize("x", [1, 2]) |
| 77 | pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6])) |
| 78 | pytest.raises(ValueError, lambda: metafunc.parametrize("x", [5, 6])) |
| 79 | metafunc.parametrize("y", [1, 2]) |
| 80 | pytest.raises(ValueError, lambda: metafunc.parametrize("y", [5, 6])) |
| 81 | pytest.raises(ValueError, lambda: metafunc.parametrize("y", [5, 6])) |
| 82 | |
| 83 | with pytest.raises(TypeError, match="^ids must be a callable or an iterable$"): |
| 84 | metafunc.parametrize("y", [5, 6], ids=42) # type: ignore[arg-type] |
| 85 | |
| 86 | def test_parametrize_error_iterator(self) -> None: |
| 87 | def func(x): |
nothing calls this directly
no test coverage detected