{
  "id": "python/pytest-marks-unknown-warning",
  "signature": "PytestUnknownMarkWarning: Unknown pytest.mark.smoke - is this a typo?",
  "signature_zh": "PytestUnknownMarkWarning: 未知的 pytest.mark.smoke - 是否为拼写错误？",
  "regex": "PytestUnknownMarkWarning:\\ Unknown\\ pytest\\.mark\\.smoke\\ \\-\\ is\\ this\\ a\\ typo\\?",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A custom marker like @pytest.mark.smoke is used but not registered in pytest configuration, so pytest warns it is unknown. With strict markers enabled, this becomes an error.",
  "root_cause_type": "generic",
  "root_cause_zh": "使用了自定义标记如 @pytest.mark.smoke 但未在 pytest 配置中注册，因此 pytest 警告其未知。启用严格标记时这会变成错误。",
  "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": "Suppressing the warning does not register the marker; `pytest -m smoke` still fails to select tests.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This changes test semantics and does not provide the intended selection behavior.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Register markers in pytest.ini:\n\n[pytest]\nmarkers =\n    smoke: quick smoke tests\n    slow: long-running tests",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.93,
      "how": "Or in pyproject.toml:\n\n[tool.pytest.ini_options]\nmarkers = [\n  'smoke: quick smoke 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.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}