{
  "id": "python/pytest-freeze-time-fixture-conflict",
  "signature": "Failed: Fixture \"frozen_time\" called directly. Use \"freezer\" instead.",
  "signature_zh": "Failed: Fixture \"frozen_time\" 被直接调用。请改用 \"freezer\"。",
  "regex": "Failed:\\ Fixture\\ \"frozen_time\"\\ called\\ directly\\.\\ Use\\ \"freezer\"\\ instead\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "pytest-freezegun/freezegun-time plugin exposes `frozen_time` as a low-level helper; tests must request `freezer` (the fixture) which manages freeze/thaw lifecycle.",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest-freezegun/freezegun-time 插件将 `frozen_time` 作为底层辅助对象暴露；测试必须请求 `freezer`（fixture），由它管理冻结/解冻生命周期。",
  "versions": [
    {
      "version": "0.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "0.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The plugin detects direct access and raises the same failure.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Bypasses the fixture and leaves time frozen across other tests, causing cascading failures.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Request the freezer fixture:\n\ndef test_expiry(freezer):\n    freezer.move_to('2024-01-01')\n    assert is_expired()",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.92,
      "how": "Or use the decorator form:\n\nfrom freezegun import freeze_time\n\n@freeze_time('2024-01-01')\ndef test_expiry(): ...",
      "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": "2025-04-11",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}