(Sample: Type[Sample])
| 353 | ids=["new", "new-inherit"], |
| 354 | ) |
| 355 | def test_issue156_undo_staticmethod(Sample: Type[Sample]) -> None: |
| 356 | monkeypatch = MonkeyPatch() |
| 357 | |
| 358 | monkeypatch.setattr(Sample, "hello", None) |
| 359 | assert Sample.hello is None |
| 360 | |
| 361 | monkeypatch.undo() # type: ignore[unreachable] |
| 362 | assert Sample.hello() |
| 363 | |
| 364 | |
| 365 | def test_undo_class_descriptors_delattr() -> None: |
nothing calls this directly
no test coverage detected