Skip to content

Commit

Permalink
Make sure that plugins/module_utils/deps.py is cleaned up before ever…
Browse files Browse the repository at this point in the history
…y test (#6459)

Make sure that plugins/module_utils/deps.py is cleaned up before every test.

ci_complete
  • Loading branch information
felixfontein authored Apr 29, 2023
1 parent b4628e2 commit 24efe6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/plugins/modules/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from ansible.module_utils.common.text.converters import to_bytes
from ansible.module_utils.common._collections_compat import MutableMapping

from ansible_collections.community.general.plugins.module_utils import deps


@pytest.fixture
def patch_ansible_module(request, mocker):
Expand All @@ -30,3 +32,8 @@ def patch_ansible_module(request, mocker):
raise Exception('Malformed data to the patch_ansible_module pytest fixture')

mocker.patch('ansible.module_utils.basic._ANSIBLE_ARGS', to_bytes(args))


@pytest.fixture(autouse=True)
def deps_cleanup():
deps._deps.clear()

0 comments on commit 24efe6b

Please sign in to comment.