{
  "id": "python/pytest-assertion-dict-diff-truncated",
  "signature": "AssertionError: assert {'a': 1, 'b': 2, ...} == {'a': 1, 'b': 3, ...}\n  Omitting 15 identical items, use -vv to show\n  Differing items:\n  {'b': 2} != {'b': 3}",
  "signature_zh": "AssertionError: assert {'a': 1, 'b': 2, ...} == {'a': 1, 'b': 3, ...}\n  省略了 15 个相同项，使用 -vv 显示\n  不同项:\n  {'b': 2} != {'b': 3}",
  "regex": "AssertionError:\\ assert\\ \\{'a':\\ 1,\\ 'b':\\ 2,\\ \\.\\.\\.\\}\\ ==\\ \\{'a':\\ 1,\\ 'b':\\ 3,\\ \\.\\.\\.\\}\\\n\\ \\ Omitting\\ 15\\ identical\\ items,\\ use\\ \\-vv\\ to\\ show\\\n\\ \\ Differing\\ items:\\\n\\ \\ \\{'b':\\ 2\\}\\ !=\\ \\{'b':\\ 3\\}",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "pytest truncates large dict/list diffs by default; the actual divergence is hidden among omitted items, making the failure hard to diagnose in CI logs.",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest 默认截断大型字典/列表差异；实际分歧隐藏在省略项中，使 CI 日志中的失败难以诊断。",
  "versions": [
    {
      "version": "7.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "8.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Output is captured and interleaved unpredictably; hard to diff visually in CI.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Works but noisy and slow; you lose pytest's structured diff.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Raise verbosity:\npytest -vv tests/test_config.py::test_merge\n# or set in config\n# [tool.pytest.ini_options]\n# addopts = \"-vv\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Or compute a minimal diff explicitly:\nfrom deepdiff import DeepDiff\ndiff = DeepDiff(expected, actual, ignore_order=True)\nassert not diff, diff",
      "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": "2024-10-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}