(tmp_path, files: dict[str, str])
| 184 | # the name resolves to exactly one real callable (the single-definition guard). |
| 185 | |
| 186 | def _extract_dir(tmp_path, files: dict[str, str]): |
| 187 | base = tmp_path / "pkg" |
| 188 | base.mkdir() |
| 189 | for name, body in files.items(): |
| 190 | (base / name).write_text(body) |
| 191 | old = os.getcwd() |
| 192 | try: |
| 193 | os.chdir(tmp_path) |
| 194 | r = extract( |
| 195 | [Path("pkg") / name for name in files], |
| 196 | cache_root=Path(".cache"), parallel=False, |
| 197 | ) |
| 198 | finally: |
| 199 | os.chdir(old) |
| 200 | nid = {n["label"].rstrip("()"): n["id"] for n in r["nodes"]} |
| 201 | return r, nid |
| 202 | |
| 203 | |
| 204 | def test_cross_file_indirect_survives_id_relativization(tmp_path): |
no test coverage detected