Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
From the runtime perspective, they are the same so there's no reason to separate
  • Loading branch information
jessicamack committed Dec 6, 2024
1 parent 64c6351 commit 77d3fd5
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions tests/importable_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ def __str__(self) -> str:
'constructed',
'awx_plugins.inventory.plugins:constructed',
),
)

supported_inventory_plugins = (
EntryPointParam(
'awx_plugins.inventory.supported',
'rhv',
Expand Down Expand Up @@ -178,16 +175,10 @@ def __str__(self) -> str:
ids=str,
)

with_supported_inventory_plugins = pytest.mark.parametrize(
'entry_point',
supported_inventory_plugins,
ids=str,
)


with_all_plugins = pytest.mark.parametrize(
'entry_point',
credential_plugins + inventory_plugins + supported_inventory_plugins,
credential_plugins + inventory_plugins,
ids=str,
)

Expand Down Expand Up @@ -226,14 +217,3 @@ def test_entry_points_are_inventory_plugin(
loaded_plugin_class = entry_points[entry_point.name].load()

assert issubclass(loaded_plugin_class, PluginFileInjector)


@with_supported_inventory_plugins
def test_entry_points_are_supported_inventory_plugin(
entry_point: EntryPointParam,
) -> None:
"""Ensure all exposed inventory plugins are of the same class.""" # noqa: D200, DAR101; FIXME
entry_points = _discover_entry_points(group=entry_point.group)
loaded_plugin_class = entry_points[entry_point.name].load()

assert issubclass(loaded_plugin_class, PluginFileInjector)

0 comments on commit 77d3fd5

Please sign in to comment.