{
  "fixtures": [
    {
      "name": "direct_circular_import",
      "description": "Same relative import appears twice — duplicate detected",
      "source": "from . import sibling\nfrom . import sibling\n",
      "filename": "circular_a.py",
      "expected_rule": "duplicate_import",
      "expected_passed": false,
      "expected_message_contains": "Duplicate relative imports",
      "expected_data_contains": {"filename": "circular_a.py"}
    },
    {
      "name": "multiple_self_references",
      "description": "Multiple duplicate relative imports — multiple duplicates detected",
      "source": "from . import alpha\nfrom . import beta\nfrom . import alpha\nfrom . import beta\n",
      "filename": "multi_cycle.py",
      "expected_rule": "duplicate_import",
      "expected_passed": false,
      "expected_message_contains": "Duplicate relative imports",
      "expected_data_contains": {"filename": "multi_cycle.py"}
    },
    {
      "name": "clean_relative_imports",
      "description": "Unique relative imports only — no duplicates",
      "source": "from . import models\nfrom . import views\nfrom . import controllers\n",
      "filename": "clean_package.py",
      "expected_rule": "duplicate_import",
      "expected_passed": true,
      "note": "All relative imports are unique"
    },
    {
      "name": "absolute_imports_not_flagged",
      "description": "Absolute imports are never flagged even if duplicated",
      "source": "import os\nimport os\nimport sys\n",
      "filename": "absolute.py",
      "expected_rule": "duplicate_import",
      "expected_passed": true,
      "note": "DuplicateImportRule only checks relative from-imports"
    },
    {
      "name": "syntax_error_skips_cycle_check",
      "description": "File with syntax error — duplicate check is skipped",
      "source": "from . import module\ndef broken(\n    return 42\n",
      "filename": "broken_cycle.py",
      "expected_rule": "duplicate_import",
      "expected_passed": true,
      "note": "DuplicateImportRule returns pass on unparseable code"
    }
  ]
}
