Skip to content

Commit 3156c13

Browse files
committed
Remove unused test strategy composites
line_delimited_data and chunked are leftovers from the old streaming-reader linehaul; nothing imports them (only `version` is used, by test_strategies.py and the UA parser tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQqEBHkvu6QDaidS4zYPVs
1 parent 606974f commit 3156c13

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

tests/strategies.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,6 @@
1616
INF = float("inf")
1717

1818

19-
@st.composite
20-
def line_delimited_data(draw, max_line_size, min_lines=1):
21-
n = draw(max_line_size)
22-
data = st.binary(min_size=1, max_size=n).filter(lambda d: b"\n" not in d)
23-
lines = draw(
24-
st.lists(data, min_size=min_lines).filter(
25-
lambda l: sum(map(len, l)) + len(l) <= n
26-
)
27-
)
28-
return b"\n".join(lines) + b"\n"
29-
30-
31-
@st.composite
32-
def chunked(draw, source):
33-
data = draw(source)
34-
35-
chunk_sizes = [0]
36-
chunk_sizes += draw(
37-
st.lists(st.integers(0, len(data) - 1), unique=True).map(sorted)
38-
)
39-
chunk_sizes += [len(data)]
40-
41-
return [data[u:v] for u, v in zip(chunk_sizes, chunk_sizes[1:])]
42-
43-
4419
def _none_for_inf(v):
4520
if v is INF:
4621
return None

0 commit comments

Comments
 (0)