{
  "id": "python/pytest-cov-not-found",
  "signature": "ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]\npytest: error: unrecognized arguments: --cov=app --cov-report=term-missing",
  "signature_zh": "ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]\npytest: error: 无法识别的参数: --cov=app --cov-report=term-missing",
  "regex": "ERROR:\\ usage:\\ pytest\\ \\[options\\]\\ \\[file_or_dir\\]\\ \\[file_or_dir\\]\\ \\[\\.\\.\\.\\]\\\npytest:\\ error:\\ unrecognized\\ arguments:\\ \\-\\-cov=app\\ \\-\\-cov\\-report=term\\-missing",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "pytest-cov is not installed, so the --cov flags are unknown. Often happens in CI where the dev requirements were not installed.",
  "root_cause_type": "generic",
  "root_cause_zh": "未安装 pytest-cov，因此 --cov 参数不被识别。常见于 CI 环境未安装开发依赖。",
  "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": "Still errors because the plugin is missing; the config is loaded before flag parsing.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The flag itself is provided by pytest-cov; without the plugin it is also unrecognized.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.97,
      "how": "pip install pytest-cov\n# or\npip install -e '.[test]'\n\npytest --cov=app --cov-report=term-missing",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pip install coverage\ncoverage run -m pytest\ncoverage report -m",
      "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-01-30",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}