()
| 1103 | } |
| 1104 | |
| 1105 | async function freshEdges(): Promise<string[]> { |
| 1106 | const copy = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-pymod-fresh-')); |
| 1107 | try { |
| 1108 | fs.cpSync(tempDir, copy, { recursive: true, filter: (src) => !src.includes('.codegraph') }); |
| 1109 | const fresh = await CodeGraph.init(copy, { index: true }); |
| 1110 | const edges = pythonEdges(fresh); |
| 1111 | fresh.destroy(); |
| 1112 | return edges; |
| 1113 | } finally { |
| 1114 | fs.rmSync(copy, { recursive: true, force: true }); |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | it('re-resolves unchanged importers when an __init__.py changes where a package starts', async () => { |
| 1119 | write({ |
no test coverage detected