(holder)
| 190 | |
| 191 | @pytest.mark.parametrize("holder", make_holder()) |
| 192 | def test_hookrecorder_basic(holder) -> None: |
| 193 | pm = PytestPluginManager() |
| 194 | pm.add_hookspecs(holder) |
| 195 | rec = HookRecorder(pm, _ispytest=True) |
| 196 | pm.hook.pytest_xyz(arg=123) |
| 197 | call = rec.popcall("pytest_xyz") |
| 198 | assert call.arg == 123 |
| 199 | assert call._name == "pytest_xyz" |
| 200 | with pytest.raises(pytest.fail.Exception): |
| 201 | rec.popcall("abc") |
| 202 | pm.hook.pytest_xyz_noarg() |
| 203 | call = rec.popcall("pytest_xyz_noarg") |
| 204 | assert call._name == "pytest_xyz_noarg" |
| 205 | |
| 206 | |
| 207 | def test_makepyfile_unicode(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected