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

Function test_from_str_with_schema

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

Test parsing SRCINFO from string with explicit schema.

(
    full_version: FullVersion, valid_srcinfo_content: str
)

Source from the content-addressed store, hash-verified

27
28
29def test_from_str_with_schema(
30 full_version: FullVersion, valid_srcinfo_content: str
31) -> None:
32 """Test parsing SRCINFO from string with explicit schema."""
33 schema = SourceInfoSchema("1")
34 result = source_info_from_str(valid_srcinfo_content, schema)
35 assert type(result) is SourceInfoV1
36 assert result.base.version == full_version
37
38
39def test_from_str_with_none_schema(

Callers

nothing calls this directly

Calls 2

source_info_from_strFunction · 0.85
SourceInfoSchemaClass · 0.50

Tested by

no test coverage detected