{
  "id": "python/unittest-expected-failure-unexpected-success",
  "signature": "unittest.case._UnexpectedSuccess: test_something",
  "signature_zh": "unittest.case._UnexpectedSuccess: test_something",
  "regex": "unittest\\.case\\._UnexpectedSuccess:\\ test_something",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A test marked with `@unittest.expectedFailure` passed, meaning the known bug is fixed or the test no longer fails as expected.",
  "root_cause_type": "generic",
  "root_cause_zh": "标记为 `@unittest.expectedFailure` 的测试通过了，意味着已知 bug 已修复或测试不再按预期失败。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the bug reappears, the test will fail and may be ignored.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Hides the fact that the bug is fixed; the test never runs.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Remove `@unittest.expectedFailure` and run the test; it should pass.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "@unittest.skipIf(sys.version_info < (3, 10), 'requires 3.10')\ndef test_something(): ...",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}