# hypothesis.errors.DeadlineExceeded: Test took 412.34ms, which exceeds the deadline of 200.00ms

- **ID:** `python/pytest-hypothesis-deadline-exceeded`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Hypothesis enforces a per-example deadline; slow test bodies, cold caches, or CI noise cause intermittent DeadlineExceeded failures.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 6.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   from hypothesis import given, settings, strategies as st

@settings(deadline=1000)  # ms
@given(st.integers())
def test_parse(n):
    assert parse(n) == n
   ```
2. **** (85% success)
   ```
   # Use hypothesis' --hypothesis-show-statistics and cProfile
pytest --hypothesis-show-statistics tests/test_x.py
# optimize hot paths in the code under test
   ```

## Dead Ends

- **** — Hides real performance regressions and makes flakiness reappear as timeouts elsewhere. (80% fail)
- **** — Warms caches but doesn't stop Hypothesis from measuring the slow example; may still exceed deadline. (70% fail)
- **** — Loses the value of property-based testing and may still hit the deadline on the first example. (85% fail)
