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
This patch causes a [note to be included](https://peps.python.org/pep-0678/) when :func:`~hypothesis.strategies.sampled_from` is given a nonempty collection of all strategy values _and_ the `given`-decorated test fails with a `TypeError` (:issue:`3819``).
4
-
This is because such a call is suggestive of intent to instead use :func:`~hypothesis.strategies.one_of`.
3
+
If a test uses :func:`~hypothesis.strategies.sampled_from` on a sequence of
4
+
strategies, and raises a ``TypeError``, we now :pep:`add a note <678>` asking
5
+
whether you meant to use :func:`~hypothesis.strategies.one_of`.
6
+
7
+
Thanks to Vince Reuter for suggesting and implementing this hint!
0 commit comments