{
  "id": "python/pytest-assertion-rewriting-disabled",
  "signature": "AssertionError: assert True == False (pytest assertion rewriting is disabled for this module)",
  "signature_zh": "断言错误：断言 True == False（此模块的 pytest 断言重写已禁用）",
  "regex": "AssertionError:\\ assert\\ True\\ ==\\ False\\ \\(pytest\\ assertion\\ rewriting\\ is\\ disabled\\ for\\ this\\ module\\)",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The test module is not being processed by pytest's assertion rewriting, often because it's in a directory with __init__.py or not in a test file.",
  "root_cause_type": "generic",
  "root_cause_zh": "测试模块未被 pytest 的断言重写处理，通常是因为它位于带有 __init__.py 的目录中或不在测试文件中。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This actually can disable assertion rewriting; removing it is better.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The assertion still fails, but the message is less informative.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Move test file to a directory without __init__.py and name it test_*.py",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Create an empty conftest.py in the test directory.",
      "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-09-14",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}