About 21 results
Open links in new tab
  1. Accept Fraction as bounds in st.decimals when precise #4466

    Jul 10, 2025 · Hello, I found myself working with Fractions and hit this little snag: version: hypothesis>=6.135.26 st.decimals (min_value=Fraction (850)).example () Throws from …

  2. Give fractions and decimals min_value and max_value flags #187

    I don't use the fractions strategy much at all in my tests, instead synthesizing fractional values from integers in various ways. Maybe, since this is up for grabs anyway, it might make sense …

  3. Deprecate min_value or max_value that cannot be generated

    Oct 6, 2018 · For example, you can check if min_value != min_int_value and then use note_deprecation to issue the warning. Finally, we should deprecate bounds for fractions() …

  4. Inconsistent acceptance of strings as bounds in hypothesis

    Yes, actually - fractions and decimals can only be constructed from a single argument if that argument is either an integer (fine, as far as it goes), or a string literal.

  5. support for specifying a Context for decimals strategy #1114

    I ended up working around it in my current tests by just replicating the default behavior of decimals with a custom Context (ie: map a fractions strategy onto Context.create_decimal).

  6. Add places argument to decimals strategy#508 - GitHub

    It therefore uses an underlying integers strategy if places is specified, or fractions if not, and makes special values an orthogonal concern. Closes #420.

  7. st.from_type(type) broken by 6.114.0 -- only returns type #4144

    Before 6.114.0 >>> [st.from_type (type).example () for _ in range (10)] [datetime.time, re.Match, ExceptionGroup, ipaddress.IPv6Interface, str, numbers.Integral, numbers.Complex, …

  8. Proposal for a more flexible bounded floats strategy #1622

    exclude_min and exclude_max are better, but if I knew nothing about Hypothesis seeing exclude_max=False in the signature of floats () would make me highly suspicious and if I knew …

  9. Generate fixed point decimals · Issue #420 - GitHub

    Jan 9, 2017 · The sample code generates fixed point decimals from the integers() strategy rather than the floats and fractions used currently. The Hypothesis generated integers map directly to …

  10. FailedHealthCheck for decimals (places=X, allow_nan=False ... - GitHub

    Jul 11, 2017 · 👍 1 goodspark reacted with thumbs up emoji This was referenced Aug 12, 2017 Bugfixes for fractions () and decimals () #777 Closed Bugfix for fixed-point decimals strategy …