You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>@given(st.booleans(), st.booleans(), st.lists(st.none()), st.booleans(), st.booleans())>>>deff(a, b, c, d, e):
assertnot (bandd)
>>>f()
Falsifyingexample: test_inquisitor_comments_basic_fail_if_either(
# The test always failed when commented parts were varied together.a=False,
b=True,
c=[], # or any other generated valued=True,
e=False, # or any other generated value
)
where we are trying to be efficient by looking for buffers that prove an arg cannot vary freely, because we saw a buffer where the arg was the only thing that varied and the buffer went from interesting to valid. But this condition may have false positives if the size of the arg buffer changed size and happened to match a buffer where additional things varied.
To solve this, we'll need to check against a more structured representation of inputs than the buffer. We could:
Check against the DataTree representation, which encodes the tree structure of calls. This may run into the same buffer-size-changed problem unless/until the DataTree is migrated to the ir (Migrate DataTree to the new IR #3818), but it may also be fine as is.
Check against the final ConjectureResult (ConjectureResult.arg_slices?).
The text was updated successfully, but these errors were encountered:
I personally favor a DataTree-based analysis, which would also be a suitable base to revive #3624 to report on sub-argument parts such as elements of st.tuples(), arguments to st.builds(), etc.
Yup, I think the correct path forward here is clearly migrating inquisitor to the ir, which should resolve this in passing. Said migration could very likely be worked on at any point in parallel with the rest of the migration. I'll get to it at some point by necessity, of course 🙂 but it's not on my immediate task list if someone wanted to beat me to it.
I've added the explain phase migration as a task to #3921.
Previously discussed in #3818 (comment).
should also mark a as freely varying.
The issue is here:
hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/shrinker.py
Lines 530 to 536 in 626d45d
where we are trying to be efficient by looking for buffers that prove an arg cannot vary freely, because we saw a buffer where the arg was the only thing that varied and the buffer went from interesting to valid. But this condition may have false positives if the size of the arg buffer changed size and happened to match a buffer where additional things varied.
To solve this, we'll need to check against a more structured representation of inputs than the buffer. We could:
DataTree
representation, which encodes the tree structure of calls. This may run into the same buffer-size-changed problem unless/until the DataTree is migrated to the ir (MigrateDataTree
to the new IR #3818), but it may also be fine as is.ConjectureResult
(ConjectureResult.arg_slices
?).The text was updated successfully, but these errors were encountered: