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

- **ID:** `python/unittest-skipif-condition`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

skipIf装饰器缺少条件参数，导致TypeError。

## 版本兼容性

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

## 解决方案

1. **** (100% 成功率)
   ```
   condition = sys.version_info < (3, 8)
@unittest.skipIf(condition, 'Python version too old')
   ```
2. **** (95% 成功率)
   ```
   @pytest.mark.skipif(condition, reason='Python version too old')
   ```

## 无效尝试

- **** — 测试将无法跳过。 (90% 失败率)
- **** — skip不需要条件，但无法根据条件动态跳过。 (70% 失败率)
