Tidy ups + unit tests:

1. Allow loading modules from --module_paths=/extra/path/here
2. Improved unit tests for module loading
3. Further small tidy ups/clean ups
This commit is contained in:
Patrick Robertson
2025-01-29 18:42:12 +01:00
parent dcd5576f29
commit 3d37c494aa
13 changed files with 216 additions and 81 deletions

View File

@@ -23,10 +23,7 @@ def setup_module(request):
# if the class does not have a .name, use the name of the parent folder
module_name = module_name.__module__.rsplit(".",2)[-2]
m = get_module(module_name).load()
m.name = module_name
m.setup({module_name : config})
m = get_module(module_name, {module_name: config})
def cleanup():
_LAZY_LOADED_MODULES.pop(module_name)