Coverage for packages/workshop/src/livery/workshop/testing/__init__.py: 100%

Measured by coverage.py 7.16.2 on CPython 3.14 while the suites of tests, packages/workshop/tests/test_workshop_package.py, packages/workshop/tests/test_workshop_conformance.py, packages/workshop/tests/test_workshop_composition.py, packages/extensions/python/tests/test_extensions_python.py, packages/extensions/nanobind/tests/test_extensions_nanobind.py, packages/extensions/mkdocstrings/tests/test_mkdocstrings.py, packages/extensions/lfs/tests/test_lfs.py, packages/extensions/docs/tests/test_extensions_docs.py, packages/extensions/cpp/tests/test_extensions_cpp.py, packages/extensions/coverage/tests/test_extensions_coverage.py, packages/extensions/conan/tests/test_extensions_conan.py, packages/extensions/cmake/tests/test_cmake.py ran.

1"""What an extension's steps and categories are judged against: the conformance kit.
2
3An extension declares steps and category tables that the gate then
4relies on. The kit states what the gate relies on, one clause at a
5time, and judges an extension against it: a
6[livery.workshop.testing.Subject][] names the extension, the sets of
7extensions to probe it with and the steps it registers,
8each [livery.workshop.testing.Clause][] returns the
9[livery.workshop.testing.Violation][]s the subject commits, and
10[livery.workshop.testing.CLAUSES][] lists them in order. An extension's own
11suite runs every clause on its subject after the extension's
12registrations ran:
13
14```python
15import pytest
16
17from livery.workshop.testing import CLAUSES, Clause, Subject
18
19SUBJECT = Subject("acme.extension", sets=(("acme",),), steps=(...))
20
21
22@pytest.mark.parametrize("clause", CLAUSES, ids=lambda clause: clause.name)
23def test_the_extension_conforms(clause: Clause) -> None:
24 assert clause.judge(SUBJECT) == []
25```
26
27The workshop's own steps run the same clauses through
28[livery.workshop.testing.builtin_subject][], so the kit cannot drift
29from what the gate enforces.
30"""
31
32from __future__ import annotations
33
34from livery.workshop.testing._conformance import (
35 CLAUSES,
36 Clause,
37 Subject,
38 Violation,
39 builtin_subject,
40 judge,
41)
42
43__all__ = [
44 "CLAUSES",
45 "Clause",
46 "Subject",
47 "Violation",
48 "builtin_subject",
49 "judge",
50]