Skip to content
Snippets Groups Projects
Commit b872718a authored by vlorentz's avatar vlorentz
Browse files

hypothesis_strategies: Prevent generation of invalid 'microseconds' values

hypothesis.strategies.integers() is inclusive, but microseconds values
greater or equal to 1 million are rejected by the model
parent d298c584
No related branches found
Tags v6.3.1
No related merge requests found
......@@ -133,7 +133,7 @@ def timestamps_d(**kwargs):
).timestamp()
defaults = dict(
seconds=integers(min_seconds, max_seconds),
microseconds=integers(0, 1000000),
microseconds=integers(0, 1000000 - 1),
)
return builds(dict, **{**defaults, **kwargs})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment