1"""What an extension's steps and categories are judged against: the conformance kit.
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:
14```python
15import pytest
17from livery.workshop.testing import CLAUSES, Clause, Subject
19SUBJECT = Subject("acme.extension", sets=(("acme",),), steps=(...))
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```
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"""
35 CLAUSES,
36 Clause,
37 Subject,
38 Violation,
39 builtin_subject,
40 judge,
41)
44 "CLAUSES",
45 "Clause",
46 "Subject",
47 "Violation",
48 "builtin_subject",
49 "judge",
50]