{
  "id": "python/pytest-mark-parametrize-argument-count",
  "signature": "ValueError: got 3 arguments for 2 parameters: ('a', 'b')",
  "signature_zh": "值错误：为 2 个参数 ('a', 'b') 提供了 3 个参数",
  "regex": "ValueError:\\ got\\ 3\\ arguments\\ for\\ 2\\ parameters:\\ \\('a',\\ 'b'\\)",
  "domain": "python",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "在 parametrize 中提供的参数数量与测试函数参数数量不匹配。",
  "root_cause_type": "generic",
  "root_cause_zh": "在 parametrize 中提供的参数数量与测试函数参数数量不匹配。",
  "versions": [
    {
      "version": "7.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "可能破坏测试逻辑，且需要同步修改 parametrize。",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "pytest 不会忽略，直接报错。",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 1.0,
      "how": "确保参数数量一致，如 `@pytest.mark.parametrize('a,b', [(1,2), (3,4)])`。",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "`@pytest.mark.parametrize('a,b', [{'a':1, 'b':2}])` 更清晰。",
      "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-12-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}