(monkeypatch)
| 45 | |
| 46 | |
| 47 | def test_pyyaml_not_installed_error(monkeypatch): |
| 48 | monkeypatch.setitem(sys.modules, "yaml", None) |
| 49 | |
| 50 | with pytest.raises(ImportError, match="PyYAML"): |
| 51 | msgspec.yaml.encode(1) |
| 52 | |
| 53 | with pytest.raises(ImportError, match="PyYAML"): |
| 54 | msgspec.yaml.decode("1", type=int) |
| 55 | |
| 56 | |
| 57 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…