1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-08 13:07:19 +00:00

Reformat everything.

This commit is contained in:
Felix Fontein 2025-11-01 12:08:41 +01:00
parent 3f2213791a
commit 340ff8586d
1008 changed files with 61301 additions and 58309 deletions

View file

@ -7,9 +7,7 @@ from __future__ import annotations
import pytest
from ansible_collections.community.general.plugins.module_utils.module_helper import (
cause_changes
)
from ansible_collections.community.general.plugins.module_utils.module_helper import cause_changes
#
@ -17,7 +15,7 @@ from ansible_collections.community.general.plugins.module_utils.module_helper im
# Parameters on_success and on_failure are deprecated and will be removed in community.general 12.0.0
# Remove testcases with those params when releasing 12.0.0
#
CAUSE_CHG_DECO_PARAMS = ['deco_args', 'expect_exception', 'expect_changed']
CAUSE_CHG_DECO_PARAMS = ["deco_args", "expect_exception", "expect_changed"]
CAUSE_CHG_DECO = dict(
none_succ=dict(deco_args={}, expect_exception=False, expect_changed=None),
none_fail=dict(deco_args={}, expect_exception=True, expect_changed=None),
@ -31,13 +29,12 @@ CAUSE_CHG_DECO = dict(
CAUSE_CHG_DECO_IDS = sorted(CAUSE_CHG_DECO.keys())
@pytest.mark.parametrize(CAUSE_CHG_DECO_PARAMS,
[[CAUSE_CHG_DECO[tc][param]
for param in CAUSE_CHG_DECO_PARAMS]
for tc in CAUSE_CHG_DECO_IDS],
ids=CAUSE_CHG_DECO_IDS)
@pytest.mark.parametrize(
CAUSE_CHG_DECO_PARAMS,
[[CAUSE_CHG_DECO[tc][param] for param in CAUSE_CHG_DECO_PARAMS] for tc in CAUSE_CHG_DECO_IDS],
ids=CAUSE_CHG_DECO_IDS,
)
def test_cause_changes_deco(deco_args, expect_exception, expect_changed):
class MockMH:
changed = None