16 lines
458 B
Python
16 lines
458 B
Python
import importlib.metadata
|
|
|
|
|
|
def test_schema_entrypoint() -> None:
|
|
(dbyaml_ep,) = importlib.metadata.entry_points(
|
|
group="validate_pyproject.file_schema", name="dbyaml"
|
|
)
|
|
|
|
dbyaml_fn = dbyaml_ep.load()
|
|
schema = dbyaml_fn()
|
|
assert schema == dbyaml_fn("dbyaml")
|
|
print(schema["properties"])
|
|
assert schema["type"] == "object"
|
|
assert schema["properties"]["verbose"]["type"] == "boolean"
|
|
assert schema["properties"]["list"]["type"] == "object"
|