{
  "id": "python/pytest-mark-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 (e.g., @pytest.mark.slow) is used but not registered, so pytest emits a warning and -m 'slow' filtering may not behave as expected.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了自定义标记（例如 @pytest.mark.slow）但未注册，因此 pytest 发出警告，并且 -m 'slow' 过滤可能无法按预期工作。",
  "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": "Silences the warning but -m filtering still doesn't recognize the mark.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "-k matches names, not markers; results differ.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Works but duplicates config; pytest.ini is simpler and canonical.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "# pytest.ini\n[pytest]\nmarkers =\n    slow: marks tests as slow\n    integration: requires external services",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "# pyproject.toml\n[tool.pytest.ini_options]\nmarkers = [\n  \"slow: marks tests as slow\",\n  \"integration: requires external services\",\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-02-27",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}