{
  "id": "python/pytest-assert-dict-difference",
  "signature": "AssertionError: assert {'a': 1, 'b': 2} == {'a': 1, 'b': 3}",
  "signature_zh": "断言错误：断言字典{'a': 1, 'b': 2}等于{'a': 1, 'b': 3}",
  "regex": "AssertionError:\\ assert\\ \\{'a':\\ 1,\\ 'b':\\ 2\\}\\ ==\\ \\{'a':\\ 1,\\ 'b':\\ 3\\}",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "测试中比较两个字典，但键'b'的值不一致，导致断言失败。",
  "root_cause_type": "generic",
  "root_cause_zh": "字典比较时，某些键值不匹配，导致断言失败。",
  "versions": [
    {
      "version": "3.9",
      "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": "字典顺序可能不同，导致假失败。",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "expected = {'a': 1, 'b': 2}\nassert actual == expected",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "assert actual == pytest.approx(expected)",
      "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": "2024-09-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}