{
  "id": "python/unittest-skip-decorator-syntax-error",
  "signature": "TypeError: skip() missing 1 required positional argument: 'reason'",
  "signature_zh": "类型错误：skip()缺少一个必需的位置参数：'reason'",
  "regex": "TypeError:\\ skip\\(\\)\\ missing\\ 1\\ required\\ positional\\ argument:\\ 'reason'",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "在unittest中，@unittest.skip装饰器需要提供一个原因字符串，如果忘记提供，会抛出TypeError。",
  "root_cause_type": "generic",
  "root_cause_zh": "unittest的skip装饰器必须传入reason参数，否则报错。",
  "versions": [
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "测试将不再跳过，可能执行失败。",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "skipIf也需要条件参数，不解决缺失reason的问题。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "@unittest.skip('暂时跳过')\ndef test_example(self):\n    pass",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 1.0,
      "how": "@pytest.mark.skip(reason='暂时跳过')\ndef test_example():\n    pass",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}