{
  "id": "python/pytest-mark-usefixtures-error",
  "signature": "UsageError: @pytest.mark.usefixtures with unknown fixture 'nonexistent_fixture'",
  "signature_zh": "使用错误：@pytest.mark.usefixtures 使用了未知的夹具 'nonexistent_fixture'",
  "regex": "UsageError:\\ @pytest\\.mark\\.usefixtures\\ with\\ unknown\\ fixture\\ 'nonexistent_fixture'",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The fixture name specified in @pytest.mark.usefixtures does not exist in any conftest.py or test file.",
  "root_cause_type": "generic",
  "root_cause_zh": "在 @pytest.mark.usefixtures 中指定的夹具名称在任何 conftest.py 或测试文件中都不存在。",
  "versions": [
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Adding a fixture with the same name but wrong scope",
      "why_fails": "The fixture must be defined and accessible; scope mismatch may still cause errors.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Removing the usefixtures marker entirely",
      "why_fails": "If the fixture is required for test setup, tests may fail due to missing dependencies.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Define the missing fixture in the test file or conftest.py.",
      "success_rate": 0.95,
      "how": "@pytest.fixture\ndef nonexistent_fixture(): return 'value'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Correct the fixture name to match an existing fixture.",
      "success_rate": 0.9,
      "how": "@pytest.mark.usefixtures('existing_fixture')",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-04-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}