# 类型错误：skip() 恰好接受一个参数（给定 0 个）

- **ID:** `python/unittest-skip-decorator-not-working`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

使用 @unittest.skip 而没有提供原因字符串。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (99% 成功率)
   ```
   @unittest.skip('reason for skipping')
def test_foo(self):
    ...
   ```
2. **** (98% 成功率)
   ```
   @pytest.mark.skip(reason='reason for skipping')
   ```

## 无效尝试

- **** — skip is a function that requires a reason argument. (90% 失败率)
- **** — skipIf requires two arguments: condition and reason. (80% 失败率)
