# 类型错误：skip()缺少一个必需的位置参数：'reason'

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

## 根因

unittest的skip装饰器必须传入reason参数，否则报错。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.10 | active | — | — |

## 解决方案

1. **** (100% 成功率)
   ```
   @unittest.skip('暂时跳过')
def test_example(self):
    pass
   ```
2. **** (100% 成功率)
   ```
   @pytest.mark.skip(reason='暂时跳过')
def test_example():
    pass
   ```

## 无效尝试

- **** — 测试将不再跳过，可能执行失败。 (70% 失败率)
- **** — skipIf也需要条件参数，不解决缺失reason的问题。 (80% 失败率)
