Test deriving SourceInfoSchema from SRCINFO file.
(valid_srcinfo_content: str)
| 33 | |
| 34 | |
| 35 | def test_derive_from_file(valid_srcinfo_content: str) -> None: |
| 36 | """Test deriving SourceInfoSchema from SRCINFO file.""" |
| 37 | with tempfile.NamedTemporaryFile(mode="w", suffix=".SRCINFO", delete=True) as tmp: |
| 38 | tmp.write(valid_srcinfo_content) |
| 39 | tmp.flush() |
| 40 | |
| 41 | schema = SourceInfoSchema.derive_from_file(Path(tmp.name)) |
| 42 | assert str(schema.version) == "1.0.0" |
| 43 | |
| 44 | |
| 45 | def test_derive_from_file_string_path(valid_srcinfo_content: str) -> None: |
nothing calls this directly
no test coverage detected