AllowList 模式: 只允许白名单路径
| 820 | def name(self): return "WorkspaceOnly" |
| 821 | |
| 822 | class AllowList(IsolationStrategy): |
| 823 | """AllowList 模式: 只允许白名单路径""" |
| 824 | def __init__(self, allowed: list[str]): |
| 825 | self.allowed = allowed |
| 826 | def check_path(self, path): |
| 827 | return any(path.startswith(a) for a in self.allowed) |
| 828 | def name(self): return "AllowList" |
| 829 | |
| 830 | # 同一组路径, 不同策略, 不同结果 |
| 831 | test_paths = [ |
no outgoing calls
no test coverage detected