{
  "id": "python/pytest-parametrize-empty-list",
  "signature": "Failed: [pytest] empty parameter set in 'test_parse' at tests/test_parse.py:12",
  "signature_zh": "Failed: [pytest] 在 tests/test_parse.py:12 处的 'test_parse' 中参数集为空",
  "regex": "Failed:\\ \\[pytest\\]\\ empty\\ parameter\\ set\\ in\\ 'test_parse'\\ at\\ tests/test_parse\\.py:12",
  "domain": "python",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "pytest.mark.parametrize received an empty list for argvalues, so pytest reports an empty parameter set and fails the test by default (controlled by empty_parameter_set_mark).",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest.mark.parametrize 收到空列表作为 argvalues，pytest 报告空参数集并默认使测试失败（由 empty_parameter_set_mark 控制）。",
  "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": "Loses parameterization entirely; the test now runs once with undefined arguments and fails differently.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Hides the fact that the data source is empty, which is often the actual bug worth surfacing.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "# pytest.ini\n[pytest]\nempty_parameter_set_mark = skip",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "CASES = load_cases() or [pytest.param(None, marks=pytest.mark.skip('no cases'))]\n\n@pytest.mark.parametrize('case', CASES)\ndef test_parse(case): ...",
      "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-07-19",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}