diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:24:58 +0000 |
commit | ba233a0cbad76b4783a03893e7bf4716fbc0f0ec (patch) | |
tree | ad369728c1edbe3631c8150585659078ae5d7d0b /src/ansiblelint/_mockings.py | |
parent | Releasing progress-linux version 6.17.2-3~progress7.99u1. (diff) | |
download | ansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.tar.xz ansible-lint-ba233a0cbad76b4783a03893e7bf4716fbc0f0ec.zip |
Merging upstream version 24.6.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ansiblelint/_mockings.py')
-rw-r--r-- | src/ansiblelint/_mockings.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ansiblelint/_mockings.py b/src/ansiblelint/_mockings.py index e0482b7..5c2a9a7 100644 --- a/src/ansiblelint/_mockings.py +++ b/src/ansiblelint/_mockings.py @@ -1,4 +1,5 @@ """Utilities for mocking ansible modules and roles.""" + from __future__ import annotations import contextlib @@ -46,7 +47,7 @@ def _make_module_stub(module_name: str, options: Options) -> None: path.mkdir(exist_ok=True, parents=True) _write_module_stub( filename=module_file, - name=module_file, + name=module_name, namespace=namespace, collection=collection, ) @@ -122,4 +123,4 @@ def _perform_mockings_cleanup(options: Options) -> None: else: path = options.cache_dir / "roles" / role_name with contextlib.suppress(OSError): - path.unlink() + path.rmdir() |