Skip to content

Commit d58adf8

Browse files
committed
This is reachable after all
1 parent d755b28 commit d58adf8

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

hypothesis-python/RELEASE.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
RELEASE_TYPE: patch
2+
3+
Fixes :issue:`3755`, where an internal condition turns out
4+
to be reachable after all.

hypothesis-python/src/hypothesis/internal/conjecture/shrinker.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,6 @@ def explain(self):
570570

571571
if result.status == Status.OVERRUN:
572572
continue # pragma: no cover # flakily covered
573-
574-
if not (
575-
len(buf_attempt_fixed) == len(result.buffer)
576-
and result.buffer.endswith(buffer[end:])
577-
): # pragma: no cover
578-
raise NotImplementedError("This should never happen")
579573
else:
580574
chunks[(start, end)].append(result.buffer[start:end])
581575

hypothesis-python/tests/conjecture/test_inquisitor.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
from hypothesis import given, settings, strategies as st
1414

15+
from tests.common.utils import fails_with
16+
1517

1618
def fails_with_output(expected, error=AssertionError, **kw):
1719
def _inner(f):
@@ -70,3 +72,11 @@ def test_inquisitor_comments_basic_fail_if_not_all(a, b, c):
7072
@given(st.text(), st.text())
7173
def test_inquisitor_no_together_comment_if_single_argument(a, b):
7274
assert a
75+
76+
77+
@fails_with(ZeroDivisionError)
78+
@settings(database=None)
79+
@given(start_date=st.datetimes(), data=st.data())
80+
def test_issue_3755_regression(start_date, data):
81+
data.draw(st.datetimes(min_value=start_date))
82+
raise ZeroDivisionError

0 commit comments

Comments
 (0)