(self)
| 120 | assert metafunc._calls[1].params == {"arg": "b"} |
| 121 | |
| 122 | def test_parametrize_error(self) -> None: |
| 123 | def func(x, y): |
| 124 | pass |
| 125 | |
| 126 | metafunc = self.Metafunc(func) |
| 127 | metafunc.parametrize("x", [1, 2]) |
| 128 | with pytest.raises(pytest.Collector.CollectError): |
| 129 | metafunc.parametrize("x", [5, 6]) |
| 130 | with pytest.raises(pytest.Collector.CollectError): |
| 131 | metafunc.parametrize("x", [5, 6]) |
| 132 | metafunc.parametrize("y", [1, 2]) |
| 133 | with pytest.raises(pytest.Collector.CollectError): |
| 134 | metafunc.parametrize("y", [5, 6]) |
| 135 | with pytest.raises(pytest.Collector.CollectError): |
| 136 | metafunc.parametrize("y", [5, 6]) |
| 137 | |
| 138 | with pytest.raises(TypeError, match=r"^ids must be a callable or an iterable$"): |
| 139 | metafunc.parametrize("y", [5, 6], ids=42) # type: ignore[arg-type] |
| 140 | |
| 141 | def test_parametrize_error_iterator(self) -> None: |
| 142 | def func(x): |
nothing calls this directly
no test coverage detected