Test parsing SRCINFO from file using Path object.
(
full_version: FullVersion, valid_srcinfo_content: str
)
| 79 | |
| 80 | |
| 81 | def test_from_file_path_object( |
| 82 | full_version: FullVersion, valid_srcinfo_content: str |
| 83 | ) -> None: |
| 84 | """Test parsing SRCINFO from file using Path object.""" |
| 85 | with tempfile.NamedTemporaryFile(mode="w", suffix=".SRCINFO", delete=True) as tmp: |
| 86 | tmp.write(valid_srcinfo_content) |
| 87 | tmp.flush() |
| 88 | |
| 89 | result = source_info_from_file(Path(tmp.name)) |
| 90 | assert type(result) is SourceInfoV1 |
| 91 | assert result.base.version == full_version |
| 92 | |
| 93 | |
| 94 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected