Skip to content

Commit

Permalink
forgot to call exec_module...
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Nov 14, 2023
1 parent 2254e7c commit b7952e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion locust/util/load_locustfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def load_locustfile(path) -> Tuple[Optional[str], Dict[str, User], List[LoadTest
loader = importlib.machinery.SourceFileLoader(os.path.splitext(locustfile)[0], path)
spec = importlib.util.spec_from_loader(loader.name, loader)
assert spec
imported = importlib.util.module_from_spec(spec)
imported_module = importlib.util.module_from_spec(spec)
loader.exec_module(imported_module)

# Remove directory from path if we added it ourselves (just to be neat)
if added_to_path:
Expand Down

0 comments on commit b7952e2

Please sign in to comment.