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

Method can_load_package

tests/loader.py:61–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59 assert sys.path.count(support) == 1
60
61 def can_load_package(self):
62 loader = _BasicLoader()
63 # Load itself doesn't explode (tests 'from . import xxx' internally)
64 mod, enclosing_dir = loader.load("package")
65 # Properties of returned values look as expected
66 # (enclosing dir is always the one above the module-or-package)
67 assert enclosing_dir == support
68 assert mod.__file__ == str(Path(support) / "package" / "__init__.py")
69
70 def load_name_defaults_to_config_tasks_collection_name(self):
71 "load() name defaults to config.tasks.collection_name"

Callers

nothing calls this directly

Calls 4

_BasicLoaderClass · 0.85
strClass · 0.85
PathClass · 0.85
loadMethod · 0.45

Tested by

no test coverage detected