# TypeError: setUp() takes 1 positional argument but 2 were given

- **ID:** `python/unittest-setup-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在 TestCase 类中定义了带参数的 setUp 方法，但 unittest 调用时不传参数

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   def setUp(self):
   ```
2. **** (70% success)
   ```
   @classmethod
def setUpClass(cls):
   ```

## Dead Ends

- **** — unittest 仍会只传 self (50% fail)
- **** — 如果方法名不是 setUp，则不会被调用 (30% fail)
