File tree 2 files changed +2
-10
lines changed
2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -136,3 +136,4 @@ ansible_collections
136
136
src /ansible_compat /_version.py
137
137
node_modules
138
138
_readthedocs
139
+ test /roles /acme.missing_deps /.ansible
Original file line number Diff line number Diff line change 13
13
from typing import TYPE_CHECKING , Any
14
14
15
15
import pytest
16
- from ansible .plugins .loader import module_loader
17
16
from packaging .version import Version
18
17
19
18
from ansible_compat .constants import INVALID_PREREQUISITES_RC
@@ -758,19 +757,11 @@ def test_load_plugins(
758
757
) -> None :
759
758
"""Tests ability to load plugin from a collection installed by requirement."""
760
759
with cwd (Path (path )):
761
- from ansible_compat .prerun import get_cache_dir
762
-
763
- rmtree (get_cache_dir (Path .cwd ()), ignore_errors = True )
764
760
runtime = Runtime (isolated = True , require_module = True )
765
761
runtime .prepare_environment (install_local = True )
766
762
for plugin_name in expected_plugins :
767
- loaded_module = module_loader .find_plugin_with_context (
768
- plugin_name ,
769
- ignore_deprecated = True ,
770
- check_aliases = True ,
771
- )
772
763
assert (
773
- loaded_module . resolved_fqcn is not None
764
+ plugin_name in runtime . plugins . module
774
765
), f"Unable to load module { plugin_name } "
775
766
776
767
runtime .clean ()
You can’t perform that action at this time.
0 commit comments