Skip to content

Commit

Permalink
test_preconf: always include bools and ints
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Dec 3, 2024
1 parent f605aad commit 81976ce
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/test_preconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,26 +198,18 @@ def everythings(
def native_unions(
draw: DrawFn,
include_strings=True,
include_bools=True,
include_ints=True,
include_floats=True,
include_nones=True,
include_bytes=True,
include_datetimes=True,
include_objectids=False,
include_literals=True,
) -> tuple[Any, Any]:
types = []
strats = {}
types = [bool, int]
strats = {bool: booleans(), int: integers()}
if include_strings:
types.append(str)
strats[str] = text()
if include_bools:
types.append(bool)
strats[bool] = booleans()
if include_ints:
types.append(int)
strats[int] = integers()
if include_floats:
types.append(float)
strats[float] = floats(allow_nan=False)
Expand Down

0 comments on commit 81976ce

Please sign in to comment.