{
  "id": "python/unittest-skipif-condition-evaluated-false",
  "signature": "AssertionError: Test should have been skipped but was not",
  "signature_zh": "断言错误：测试本应被跳过但未被跳过",
  "regex": "AssertionError:\\ Test\\ should\\ have\\ been\\ skipped\\ but\\ was\\ not",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The skipIf condition is incorrectly evaluated, causing the test to run when it should be skipped.",
  "root_cause_type": "generic",
  "root_cause_zh": "skipIf 条件被错误评估，导致测试在应被跳过时运行。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This might skip the test when it should run.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The test will always run, defeating the purpose.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "@unittest.skipIf(condition, 'reason')\ndef test_foo(self):\n    ...",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "@pytest.mark.skipif(condition, reason='reason')",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-11-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}