41 snapshots: ArrayMap[str, Snapshot],
42 tests_that_ran: ArrayMap[str,
"WithinTestGC"],
43 tests_that_didnt_run: Iterable[str],
48 total_gc = tests_that_ran
49 for method
in tests_that_didnt_run:
52 gc_roots = total_gc.items()
53 keys = snapshots.keys()
57 while key_idx < len(keys)
and gc_idx < len(gc_roots):
58 key: str = keys[key_idx]
59 gc: tuple[str, WithinTestGC] = gc_roots[gc_idx]
60 if key.startswith(gc[0]):
61 if len(key) == len(gc[0]):
63 if not gc[1].
keeps(
""):
64 stale_indices.append(key_idx)
67 elif key[len(gc[0])] ==
"/":
69 suffix = key[len(gc[0]) :]
70 if not gc[1].
keeps(suffix):
71 stale_indices.append(key_idx)
84 stale_indices.append(key_idx)
87 while key_idx < len(keys):
88 stale_indices.append(key_idx)