# TypeError: TestCase.__init__() missing 1 required positional argument: 'methodName'

- **ID:** `python/unittest-testcase-requires-method`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Instantiating a `unittest.TestCase` subclass directly (e.g. `MyTest()`) instead of letting the test runner instantiate it, or forgetting to pass a method name.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use the test runner instead of instantiating directly:
import unittest
unittest.main()
# or
loader = unittest.TestLoader()
suite = loader.loadTestsFromTestCase(MyTest)
unittest.TextTestRunner().run(suite)
   ```
2. **** (85% success)
   ```
   If you must instantiate: `case = MyTest('test_something')` then `case.run(result)`.
   ```

## Dead Ends

- **** — Creates an invalid test case that fails later at run time with a different error. (60% fail)
- **** — Still raises because TestCase requires methodName. (70% fail)
