{
  "id": "python/pytest-warning-filter-error",
  "signature": "PytestConfigWarning: Unknown config option: filterwarnings",
  "signature_zh": "Pytest 配置警告：未知配置选项 filterwarnings",
  "regex": "PytestConfigWarning:\\ Unknown\\ config\\ option:\\ filterwarnings",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "pytest.ini 或 pyproject.toml 中配置了错误的 filterwarnings 语法",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest.ini 或 pyproject.toml 中配置了错误的 filterwarnings 语法",
  "versions": [
    {
      "version": "7.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "警告可能掩盖实际问题",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "无法控制警告，测试输出混乱",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "在 pytest.ini 中使用 filterwarnings = error::DeprecationWarning",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "pytest -W error::DeprecationWarning",
      "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-07-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}