# TypeError: assertRaises() missing 1 required positional argument: 'callable'

- **ID:** `python/unittest-assertraises-no-context`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

`assertRaises` is used as `with self.assertRaises(ValueError):` but the exception type is passed as a string or the callable form is used incorrectly.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (97% success)
   ```
   Use the context manager form correctly:
with self.assertRaises(ValueError):
    parse('bad')

Or the callable form:
self.assertRaises(ValueError, parse, 'bad')
   ```

## Dead Ends

- **** — Strings are not exception classes; raises TypeError or fails silently. (80% fail)
- **** — Catches all exceptions and hides real bugs. (70% fail)
