{
  "id": "python/pytest-doctest-failure",
  "signature": "Failed: DOCTEST ... Expected:\n    4\nGot:\n    5",
  "signature_zh": "失败: DOCTEST ... 预期:\n    4\n实际:\n    5",
  "regex": "Failed:\\ DOCTEST\\ \\.\\.\\.\\ Expected:\\\n\\ \\ \\ \\ 4\\\nGot:\\\n\\ \\ \\ \\ 5",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A doctest example in a docstring produced a different output than expected. This can be due to changes in the function or environment-dependent output.",
  "root_cause_type": "generic",
  "root_cause_zh": "文档字符串中的 doctest 示例产生的输出与预期不同。这可能是由于函数更改或环境相关的输出。",
  "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": "This loses the documentation and test coverage.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This skips the test but doesn't fix the discrepancy.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "If the change is intentional, update the docstring to match the new output.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": ">>> print(some_func())  # doctest: +ELLIPSIS\nHello ...\nThis allows parts of the output to vary.",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}