Skip to content

Commit a270fb9

Browse files
committed
Add isolated MatchAny and range asserts to the bool/int cross-match test
Lock the single-value MatchAny path and the check_range bool guard against regressions, in addition to the existing combined-condition coverage.
1 parent 19d8e88 commit a270fb9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/test_in_memory.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,7 @@ def matched_ids(condition: models.FieldCondition) -> list:
333333
models.FieldCondition(key="n", match=models.MatchExcept(**{"except": [1]}))
334334
) == [2, 3, 4]
335335
assert matched_ids(models.FieldCondition(key="n", range=models.Range(gte=1, lte=1))) == [1]
336+
# A single-value MatchAny and a numeric range that True would satisfy must exclude the
337+
# bool payload too, locking in the isolated MatchAny and check_range paths.
338+
assert matched_ids(models.FieldCondition(key="n", match=models.MatchAny(any=[1]))) == [1]
339+
assert matched_ids(models.FieldCondition(key="n", range=models.Range(gt=0))) == [1]

0 commit comments

Comments
 (0)