Coverage for tests/nodes/common.py: 100%
5 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-02 11:07 +0100
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-02 11:07 +0100
1"""Objects used among tests in this module."""
3import hypothesis.strategies as st
5from certus.nodes import Composite
7from ..common import ST_LOGPROBS, ST_STARTS, st_token_lists, st_tokens
9ST_COMPOSITE_NODES = st.recursive(
10 st_tokens(),
11 lambda children: st.builds(Composite, children=st.lists(children, min_size=1, max_size=3)),
12 max_leaves=10,
13).filter(lambda n: isinstance(n, Composite))
15__all__ = ["ST_LOGPROBS", "ST_STARTS", "st_tokens", "st_token_lists"]