|
10 | 10 |
|
11 | 11 | from hypothesis import given, settings, strategies as st
|
12 | 12 | from hypothesis.database import InMemoryExampleDatabase
|
13 |
| -from hypothesis.internal.compat import int_from_bytes |
14 | 13 | from hypothesis.internal.conjecture.data import ConjectureData
|
15 | 14 | from hypothesis.internal.conjecture.engine import ConjectureRunner
|
16 | 15 | from hypothesis.internal.conjecture.shrinker import Shrinker, node_program
|
@@ -80,29 +79,6 @@ def x(data):
|
80 | 79 | assert len(x) == n
|
81 | 80 |
|
82 | 81 |
|
83 |
| -def test_regression_1(): |
84 |
| - # This is a really hard to reproduce bug that previously triggered a very |
85 |
| - # specific exception inside one of the shrink passes. It's unclear how |
86 |
| - # useful this regression test really is, but nothing else caught the |
87 |
| - # problem. |
88 |
| - # |
89 |
| - # update 2024-01-15: we've since changed generation and are about to |
90 |
| - # change shrinking, so it's unclear if the failure case this test was aimed |
91 |
| - # at (1) is still being covered or (2) even exists anymore. |
92 |
| - # we can probably safely remove this once the shrinker is rebuilt. |
93 |
| - @run_to_buffer |
94 |
| - def x(data): |
95 |
| - data.draw_bytes(2, forced=b"\x01\x02") |
96 |
| - data.draw_bytes(2, forced=b"\x01\x00") |
97 |
| - v = data.draw_integer(0, 2**41 - 1) |
98 |
| - if v >= 512 or v == 254: |
99 |
| - data.mark_interesting() |
100 |
| - |
101 |
| - assert list(x)[:-2] == [1, 2, 1, 0, 0, 0, 0, 0, 0] |
102 |
| - |
103 |
| - assert int_from_bytes(x[-2:]) in (254, 512) |
104 |
| - |
105 |
| - |
106 | 82 | @given(st.integers(0, 255), st.integers(0, 255))
|
107 | 83 | def test_cached_with_masked_byte_agrees_with_results(byte_a, byte_b):
|
108 | 84 | def f(data):
|
|
0 commit comments