{
  "id": "python/pytest-skip-vs-xfail-confusion",
  "signature": "pytest.skip: Skipped: condition not met",
  "signature_zh": "pytest.skip: 跳过: 条件未满足",
  "regex": "pytest\\.skip:\\ Skipped:\\ condition\\ not\\ met",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A test was skipped using pytest.skip() when the developer intended to mark it as expected to fail (xfail). The test is not run, but the failure is not tracked.",
  "root_cause_type": "generic",
  "root_cause_zh": "开发者使用 pytest.skip() 跳过测试，但本意是标记为预期失败（xfail）。测试未运行，但失败未被跟踪。",
  "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": "pytest.xfail immediately fails the test, which is not the same as marking it as expected to fail. The test will be reported as failed.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Comments do not change test behavior. The test remains skipped and the expected failure is not tracked.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "@pytest.mark.xfail(reason='Known bug #123')\ndef test_broken():\n    assert False",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "def test_conditional():\n    if not feature_enabled():\n        pytest.xfail('Feature not enabled')\n    assert feature_works()",
      "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.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}