Sanity check to avoid leaking accidentally the `self.tmp_dir`.
(self, out)
| 191 | return p |
| 192 | |
| 193 | def _validate_out(self, out): |
| 194 | """Sanity check to avoid leaking accidentally the `self.tmp_dir`.""" |
| 195 | if isinstance(out, list): |
| 196 | assert not any(elem.startswith('/') for elem in out) |
| 197 | elif not isinstance(out, (bool, type(None))): |
| 198 | raise TypeError( |
| 199 | f'Unexpected return type {out!r} for MockFs, please open an issue' |
| 200 | ) |
| 201 | return out |
| 202 | |
| 203 | def add_file(self, path, content=None) -> None: |
| 204 | """Add a file, creating all parent directories.""" |
no outgoing calls
no test coverage detected