Skip to content

Commit 8ed5a9a

Browse files
committed
Tighten comment on unsorted-input test for precision
Code review noted the comment attributed the empty result to "unsorted input" generally, when the actual mechanism is that the groupby key (enumerate index - value) only repeats across an ascending run; a descending sequence changes the key at every step.
1 parent b68f2ea commit 8ed5a9a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_parser_util.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def test_isolated_values_between_runs_are_excluded() -> None:
3232

3333

3434
def test_unsorted_input_is_not_treated_as_contiguous() -> None:
35-
# the function assumes ascending, strictly increasing input (as produced
36-
# by an `enumerate`-based index scan, which is how join_on_conjunctions
37-
# uses it); descending or out-of-order input won't find real-world runs
35+
# the grouping key (enumerate index - value) only repeats for ascending,
36+
# strictly increasing runs (as produced by an `enumerate`-based index
37+
# scan, which is how join_on_conjunctions uses it); a descending
38+
# sequence changes the key at every step, so no run is ever found
3839
assert group_contiguous_integers([3, 2, 1]) == []

0 commit comments

Comments
 (0)