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

Function test_creation

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

Test creating SourceInfoSchema with different version formats.

()

Source from the content-addressed store, hash-verified

9
10
11def test_creation() -> None:
12 """Test creating SourceInfoSchema with different version formats."""
13 schema = SourceInfoSchema("1")
14 assert str(schema.version) == "1.0.0"
15
16 schema_full = SourceInfoSchema("1.0.0")
17 assert str(schema_full.version) == "1.0.0"
18
19 schema_from_version = SourceInfoSchema(SchemaVersion(1))
20 assert str(schema_from_version.version) == "1.0.0"
21
22
23def test_derive_from_str(valid_srcinfo_content: str) -> None:

Callers

nothing calls this directly

Calls 2

SourceInfoSchemaClass · 0.50
SchemaVersionClass · 0.50

Tested by

no test coverage detected