-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract and use strategy for finite floats
- Loading branch information
1 parent
665f4f0
commit d79d7e6
Showing
3 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"""Strategies for basic types.""" | ||
|
||
from functools import partial | ||
|
||
import hypothesis.strategies as st | ||
|
||
finite_floats = partial(st.floats, allow_infinity=False, allow_nan=False) | ||
"""A strategy producing finite (i.e., non-nan and non-infinite) floats.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters