{
  "id": "python/pytest-deselect-no-tests",
  "signature": "no tests ran in 0.01s\nERROR: file or directory not found: tests/test_missing.py",
  "signature_zh": "0.01s 内未运行任何测试\nERROR: 找不到文件或目录: tests/test_missing.py",
  "regex": "no\\ tests\\ ran\\ in\\ 0\\.01s\\\nERROR:\\ file\\ or\\ directory\\ not\\ found:\\ tests/test_missing\\.py",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "A path passed to pytest does not exist, or a -k expression matched nothing (the latter usually shows 'no tests ran' without the file error). Often caused by a typo in CI config or a renamed test file.",
  "root_cause_type": "generic",
  "root_cause_zh": "传给 pytest 的路径不存在，或 -k 表达式未匹配任何测试（后者通常只显示 'no tests ran' 而无文件错误）。常见于 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": "Hides the fact that the intended test file was renamed or moved; real tests are silently skipped.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Runs everything, which may be slow and may include tests that were intentionally excluded.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pytest --collect-only tests/ -q\n# check the file exists:\nls tests/test_missing.py\n# fix the path in CI config",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "pytest --collect-only -q -k 'login and not slow'\npytest -k 'login and not slow'",
      "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": "2025-03-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}