caxton.testing¶
A stable, pytest-independent inspection and comparison API. Every value it returns is immutable and backend-neutral.
See Testing documents for guidance on which level to use.
Semantic inspection¶
Layout inspection¶
Artifact inspection¶
Comparison and snapshots¶
Hypothesis strategies¶
Requires the hypothesis extra.
Functions:
-
identifiers–Generate compact identifiers accepted by Caxton models.
-
semantic_types–Generate built-in semantic type declarations.
-
columns–Generate one valid semantic column.
-
spreadsheet_documents–Generate a bounded, structurally valid spreadsheet declaration.
identifiers
¶
identifiers() -> SearchStrategy[str]
Generate compact identifiers accepted by Caxton models.
Returns:
-
SearchStrategy[str]–An identifier strategy.
semantic_types
¶
semantic_types() -> SearchStrategy[SemanticType]
Generate built-in semantic type declarations.
Returns:
-
SearchStrategy[SemanticType]–A semantic type strategy.