{
  "id": "python/unittest-testloader-error",
  "signature": "AttributeError: 'TestLoader' object has no attribute 'loadTestsFromName'",
  "signature_zh": "属性错误：TestLoader 对象没有 loadTestsFromName 属性",
  "regex": "AttributeError:\\ 'TestLoader'\\ object\\ has\\ no\\ attribute\\ 'loadTestsFromName'",
  "domain": "python",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "在 Python 3.12 中，TestLoader 的方法名可能已更改或已弃用",
  "root_cause_type": "generic",
  "root_cause_zh": "在 Python 3.12 中，TestLoader 的方法名可能已更改或已弃用",
  "versions": [
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "新版本已移除",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "失去动态加载功能",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "loader = unittest.TestLoader(); suite = loader.loadTestsFromTestCase(MyTest)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "suite = unittest.defaultTestLoader.discover('tests')",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}