{
  "id": "python/pytest-assertion-error-in-fixture",
  "signature": "AssertionError: assert 'foo' == 'bar' in fixture setup",
  "signature_zh": "断言错误：fixture 设置中断言 'foo' == 'bar'",
  "regex": "AssertionError:\\ assert\\ 'foo'\\ ==\\ 'bar'\\ in\\ fixture\\ setup",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "An assertion inside a fixture fails during setup, causing the test to error out.",
  "root_cause_type": "generic",
  "root_cause_zh": "fixture 设置中的断言失败，导致测试出错。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This may not validate the fixture's setup correctly.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This hides the problem and may cause downstream issues.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "with pytest.raises(AssertionError):\n    assert 'foo' == 'bar'",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "if condition:\n    assert ...\nelse:\n    pytest.skip('Condition not met')",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}