MCPcopy Index your code
hub / github.com/pyinvoke/invoke / _BasicLoader

Class _BasicLoader

tests/loader.py:16–31  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

14
15
16class _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
34class Loader_:

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…