{
  "id": "python/pytest-cov-no-data-collected",
  "signature": "Coverage.py warning: No data was collected. (no-data-collected)",
  "signature_zh": "Coverage.py 警告: 未收集到数据。(no-data-collected)",
  "regex": "Coverage\\.py\\ warning:\\ No\\ data\\ was\\ collected\\.\\ \\(no\\-data\\-collected\\)",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "pytest-cov did not collect coverage because the source paths are not specified or the tests did not import the target modules.",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest-cov 未收集覆盖率，因为未指定源路径或测试未导入目标模块。",
  "versions": [
    {
      "version": "4.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Without a path, coverage may not know which files to measure.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This disables coverage reporting entirely.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.98,
      "how": "Run: pytest --cov=myapp tests/\nOr in pytest.ini:\n[pytest]\naddopts = --cov=myapp",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Check that test files import the modules under test. Coverage only measures executed code.",
      "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-04-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}