File: test_schema.py

package info (click to toggle)
black 25.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,180 kB
  • sloc: python: 113,389; makefile: 25
file content (12 lines) | stat: -rw-r--r-- 347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
import importlib.metadata


def test_schema_entrypoint() -> None:
    (black_ep,) = importlib.metadata.entry_points(
        group="validate_pyproject.tool_schema", name="black"
    )

    black_fn = black_ep.load()
    schema = black_fn()
    assert schema == black_fn("black")
    assert schema["properties"]["line-length"]["type"] == "integer"