{
  "id": "python/pytest-doctest-ellipsis-mismatch",
  "signature": "Expected:\n    {'id': 1, 'name': 'Alice', 'created': '2024-01-01T00:00:00'}\nGot:\n    {'id': 1, 'name': 'Alice', 'created': '2024-01-01T00:00:00.123456'}",
  "signature_zh": "预期：\n    {'id': 1, 'name': 'Alice', 'created': '2024-01-01T00:00:00'}\n实际：\n    {'id': 1, 'name': 'Alice', 'created': '2024-01-01T00:00:00.123456'}",
  "regex": "Expected:\\\n\\ \\ \\ \\ \\{'id':\\ 1,\\ 'name':\\ 'Alice',\\ 'created':\\ '2024\\-01\\-01T00:00:00'\\}\\\nGot:\\\n\\ \\ \\ \\ \\{'id':\\ 1,\\ 'name':\\ 'Alice',\\ 'created':\\ '2024\\-01\\-01T00:00:00\\.123456'\\}",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Doctest compares the exact repr of the output by default. Non-deterministic values (timestamps, UUIDs, memory addresses, floats) differ between runs, so the doctest fails intermittently.",
  "root_cause_type": "generic",
  "root_cause_zh": "Doctest 默认比较输出的精确 repr。非确定性值（时间戳、UUID、内存地址、浮点数）在运行之间不同，因此 doctest 会间歇性失败。",
  "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": "Skips the whole example, including the parts that are deterministic and worth testing.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Doctest does not support regex natively; you'd need a custom OutputChecker, which is heavy for one example.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": ">>> get_user(1)  # doctest: +ELLIPSIS\n{'id': 1, 'name': 'Alice', 'created': '...'}",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.92,
      "how": "# In conftest.py or pytest.ini:\n# doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE\n\n>>> get_user(1)  # doctest: +ELLIPSIS\n{'id': 1, 'name': 'Alice', 'created': '...'}",
      "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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}