{
  "id": "python/pytest-unknown-mark-warning",
  "signature": "PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a plugin needed to handle it?",
  "signature_zh": "PytestUnknownMarkWarning: 未知的 pytest.mark.slow - 是否有处理它的插件？",
  "regex": "PytestUnknownMarkWarning:\\ Unknown\\ pytest\\.mark\\.slow\\ \\-\\ is\\ this\\ a\\ plugin\\ needed\\ to\\ handle\\ it\\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A custom marker like @pytest.mark.slow is used but not registered in pytest configuration. pytest warns and may treat it as a no-op depending on --strict-markers.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了自定义标记（如 @pytest.mark.slow），但未在 pytest 配置中注册。pytest 会发出警告，并在 --strict-markers 下可能将其视为无效。",
  "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": "Suppresses the warning but the marker still has no registered meaning; with --strict-markers the suite still fails.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changes test selection semantics; tests intended to run now get skipped.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.96,
      "how": "# pytest.ini\n[pytest]\nmarkers =\n    slow: marks tests as slow\n    integration: marks integration tests",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.94,
      "how": "[tool.pytest.ini_options]\nmarkers = [\n  \"slow: marks tests as slow\",\n  \"integration: marks integration tests\",\n]",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}