MCPcopy Create free account
hub / github.com/archlinux/alpm / test_from_file_invalid

Function test_from_file_invalid

python-alpm/tests/srcinfo/test_source_info.py:105–112  ·  view source on GitHub ↗

Test parsing invalid SRCINFO from file raises error.

(content: str)

Source from the content-addressed store, hash-verified

103 ],
104)
105def test_from_file_invalid(content: str) -> None:
106 """Test parsing invalid SRCINFO from file raises error."""
107 with tempfile.NamedTemporaryFile(mode="w", suffix=".SRCINFO", delete=True) as tmp:
108 tmp.write(content)
109 tmp.flush()
110
111 with pytest.raises(SourceInfoError):
112 source_info_from_file(tmp.name)
113
114
115def test_from_file_nonexistent() -> None:

Callers

nothing calls this directly

Calls 3

source_info_from_fileFunction · 0.85
writeMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected