Tests top level Loader behavior with basic finder stub. Used when we want to make sure we're testing Loader.load and not e.g. FilesystemLoader's specific implementation.
| 14 | |
| 15 | |
| 16 | class _BasicLoader(Loader): |
| 17 | """ |
| 18 | Tests top level Loader behavior with basic finder stub. |
| 19 | |
| 20 | Used when we want to make sure we're testing Loader.load and not e.g. |
| 21 | FilesystemLoader's specific implementation. |
| 22 | """ |
| 23 | |
| 24 | def find(self, name): |
| 25 | path = os.path.join(support, name) |
| 26 | if os.path.exists(f"{path}.py"): |
| 27 | path = f"{path}.py" |
| 28 | elif os.path.exists(path): |
| 29 | path = os.path.join(path, "__init__.py") |
| 30 | spec = spec_from_file_location(name, path) |
| 31 | return spec |
| 32 | |
| 33 | |
| 34 | class Loader_: |
no outgoing calls
no test coverage detected
searching dependent graphs…