Skip to content

Commit 2c4588c

Browse files
committed
clarify deadline error message
1 parent b4725b0 commit 2c4588c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hypothesis-python/src/hypothesis/errors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ class DeadlineExceeded(_Trimmable):
243243
def __init__(self, runtime: timedelta, deadline: timedelta) -> None:
244244
super().__init__(
245245
f"Test took {runtime.total_seconds() * 1000:.2f}ms, which exceeds "
246-
f"the deadline of {deadline.total_seconds() * 1000:.2f}ms"
246+
f"the deadline of {deadline.total_seconds() * 1000:.2f}ms. If you "
247+
"expect test cases to take this long, you can use @settings(deadline=...) "
248+
"to either set a higher deadline, or to disable it with deadline=None."
247249
)
248250
self.runtime = runtime
249251
self.deadline = deadline

0 commit comments

Comments
 (0)