{
  "id": "python/pytest-marker-unknown-warning",
  "signature": "PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning",
  "signature_zh": "PytestUnknownMarkWarning: 未知的 pytest.mark.slow - 是否拼写错误？你可以注册自定义标记以避免此警告",
  "regex": "PytestUnknownMarkWarning:\\ Unknown\\ pytest\\.mark\\.slow\\ \\-\\ is\\ this\\ a\\ typo\\?\\ \\ You\\ can\\ register\\ custom\\ marks\\ to\\ avoid\\ this\\ warning",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A custom marker is used without being registered in pytest.ini/pyproject.toml; pytest emits a warning, and with `-W error` it becomes a failure.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了未在 pytest.ini/pyproject.toml 注册的自定义标记；pytest 发出警告，在 `-W error` 下变为失败。",
  "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": "Changes test semantics (skips instead of conditionally selecting) and loses filtering capability.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Hides typos in marker names and prevents `--strict-markers` from catching regressions.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Suppresses all warnings, including real deprecations and correctness issues.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "# pyproject.toml\n[tool.pytest.ini_options]\nmarkers = [\n  \"slow: marks tests as slow\",\n  \"integration: requires external services\",\n]\n\n# then\npytest -m slow",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "# pyproject.toml\n[tool.pytest.ini_options]\naddopts = \"--strict-markers\"\nmarkers = [\"slow: slow tests\"]",
      "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": "2025-07-08",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}