{
  "id": "python/pytest-timeout-exceeded",
  "signature": "pytest-timeout: TimeoutError: Test timed out after 5.0 seconds",
  "signature_zh": "pytest-timeout：超时错误：测试在 5.0 秒后超时",
  "regex": "pytest\\-timeout:\\ TimeoutError:\\ Test\\ timed\\ out\\ after\\ 5\\.0\\ seconds",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The test takes longer than the timeout set by the pytest-timeout plugin, often due to infinite loops, slow I/O, or network delays.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试花费的时间超过了 pytest-timeout 插件设置的超时时间，通常是由于无限循环、慢速 I/O 或网络延迟。",
  "versions": [
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Increasing the timeout value may allow the test to pass but does not address the underlying performance issue.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Removing the timeout entirely may cause CI pipelines to hang indefinitely.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.8,
      "how": "Optimize the test code to reduce execution time, e.g., by mocking slow external calls or reducing data size.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "Use a higher timeout for specific tests with @pytest.mark.timeout(10) if the test legitimately requires more time.",
      "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": "2026-12-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}