From f8e5830ef447a0f0cc138f22d0f5f9dd983563dd Mon Sep 17 00:00:00 2001 From: Liam DeVoe Date: Thu, 13 Jun 2024 19:09:04 -0400 Subject: [PATCH] add start == end todo --- hypothesis-python/src/hypothesis/internal/conjecture/data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hypothesis-python/src/hypothesis/internal/conjecture/data.py b/hypothesis-python/src/hypothesis/internal/conjecture/data.py index 3f6bdea7dc..6e8761f9f9 100644 --- a/hypothesis-python/src/hypothesis/internal/conjecture/data.py +++ b/hypothesis-python/src/hypothesis/internal/conjecture/data.py @@ -631,6 +631,9 @@ def begin(self) -> None: self.groups: "Dict[int, Set[Tuple[int, int]]]" = defaultdict(set) def start_example(self, i: int, label_index: int) -> None: + # TODO should we discard start == end cases? occurs for eg st.data() + # which is conditionally or never drawn from. arguably swapping + # nodes with the empty list is a useful mutation enabled by start == end? key = (self.examples[i].ir_start, self.examples[i].ir_end) self.groups[label_index].add(key)