Skip to content

Self-hosted AI workspace.

Python

fix(tests): use non-repeating split chunk fixture

Alexandre Teixeira4de90251b48c
diff --git a/tests/test_split_chunks_no_duplicate_tail.py b/tests/test_split_chunks_no_duplicate_tail.py
index a7fc32df4..7d2f1d1bb 100644
--- a/tests/test_split_chunks_no_duplicate_tail.py
+++ b/tests/test_split_chunks_no_duplicate_tail.py
@@ -14,7 +14,10 @@ def test_no_duplicate_tail_chunk():
def test_no_chunk_is_contained_in_another():
- text = "".join(chr(33 + (k % 90)) for k in range(2000))
+ text = "\n".join(
+ f"unique-line-{k:04d}-square-{k * k:08d}-cube-{k * k * k:012d}"
+ for k in range(300)
+ )
chunks = split_chunks(text, size=1000, overlap=200)
# The buggy version produced a final 200-char chunk fully inside the prior one.
for a in range(len(chunks)):