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

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

## Root Cause

The test calls `self.assertRaises(SomeError)` without the callable or without using it as a context manager. assertRaises requires either a callable as the second argument or use as `with self.assertRaises(SomeError):`.

## Version Compatibility

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

## Workarounds

1. **** (97% success)
   ```
   Use the context manager form:

with self.assertRaises(ValueError):
    parse_bad_input()
   ```
2. **** (95% success)
   ```
   Or pass the callable as the second argument:

self.assertRaises(ValueError, parse_bad_input)
   ```

## Dead Ends

- **** — assertRaises expects an exception class or tuple of classes; an instance raises TypeError about expected exceptions. (85% fail)
- **** — Loses the assertRaises semantics and can silently pass if the wrong exception type is raised. (60% fail)
