Test deriving SourceInfoSchema from invalid file raises error.
()
| 53 | |
| 54 | |
| 55 | def test_derive_from_file_invalid() -> None: |
| 56 | """Test deriving SourceInfoSchema from invalid file raises error.""" |
| 57 | with tempfile.NamedTemporaryFile(mode="w", suffix=".SRCINFO", delete=True) as tmp: |
| 58 | tmp.write("not a valid srcinfo") |
| 59 | tmp.flush() |
| 60 | |
| 61 | with pytest.raises(SourceInfoError): |
| 62 | SourceInfoSchema.derive_from_file(tmp.name) |
| 63 | |
| 64 | |
| 65 | def test_derive_from_nonexistent_file() -> None: |
nothing calls this directly
no test coverage detected