(checkout: Path)
| 148 | |
| 149 | |
| 150 | def _missing_import_targets(checkout: Path) -> set[str]: |
| 151 | _write(checkout / "pkg" / "__init__.py", "") |
| 152 | source = _write( |
| 153 | checkout / "pkg" / "app.py", |
| 154 | "from .absent import helper\n" |
| 155 | "from pkg.absent import other\n\n" |
| 156 | "def run():\n" |
| 157 | " return helper(), other()\n", |
| 158 | ) |
| 159 | result = extract([source, checkout / "pkg" / "__init__.py"], cache_root=checkout) |
| 160 | return {e["target"] for e in result["edges"] if e["relation"] == "imports_from"} |
| 161 | |
| 162 | |
| 163 | def test_missing_relative_import_target_id_does_not_depend_on_the_checkout(tmp_path: Path): |
no test coverage detected