# Failed: DID NOT RAISE <class 'ValueError'>

- **ID:** `python/pytest-raises-missed-exception`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test using pytest.raises(ValueError) expects an exception to be raised, but the code executes without raising it.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Check the code logic to ensure it raises ValueError under the given conditions, and fix if necessary.
   ```
2. **** (85% success)
   ```
   Add debug prints to verify the input that should trigger the exception.
   ```

## Dead Ends

- **** — This defeats the purpose of the test; it should validate real error conditions. (95% fail)
- **** — This can mask other unexpected exceptions and reduce test effectiveness. (80% fail)
