| 118 | |
| 119 | |
| 120 | class FakeResourceTree: |
| 121 | def __init__(self, files: dict[str, str], path: str | None = None) -> None: |
| 122 | self.files = files |
| 123 | self.path = path |
| 124 | |
| 125 | def joinpath(self, path: str) -> 'FakeResourceTree': |
| 126 | return FakeResourceTree(self.files, path) |
| 127 | |
| 128 | def open(self, mode: str) -> StringIO: |
| 129 | assert self.path is not None |
| 130 | if self.path not in self.files: |
| 131 | raise FileNotFoundError(self.path) |
| 132 | return StringIO(self.files[self.path]) |
| 133 | |
| 134 | |
| 135 | def make_repl_cli(sqlexecute: Any | None = None) -> Any: |
no outgoing calls