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

Function test_derive_from_empty_file

python-alpm/tests/srcinfo/test_schema.py:109–116  ·  view source on GitHub ↗

Test deriving SourceInfoSchema from empty file raises error.

()

Source from the content-addressed store, hash-verified

107
108
109def test_derive_from_empty_file() -> None:
110 """Test deriving SourceInfoSchema from empty file raises error."""
111 with tempfile.NamedTemporaryFile(mode="w", suffix=".SRCINFO", delete=True) as tmp:
112 tmp.write("")
113 tmp.flush()
114
115 with pytest.raises(SourceInfoError):
116 SourceInfoSchema.derive_from_file(tmp.name)

Callers

nothing calls this directly

Calls 3

writeMethod · 0.80
flushMethod · 0.80
derive_from_fileMethod · 0.45

Tested by

no test coverage detected