mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Run black -l 120 on all Python files to unify the style (#939)
Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
parent
50c5a2549d
commit
4c682e170c
39 changed files with 3828 additions and 3129 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
|
@ -8,12 +9,17 @@ from ansible_collections.containers.podman.plugins.module_utils.podman.common im
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('test_input, expected', [
|
||||
(["AAA", "BBB"], ["AAA", "BBB"]),
|
||||
("AAQQ", "AAQQ"),
|
||||
({"AAA": "AaaAa", "11": 22, "AbCdEf": None, "bbb": "aaaAA"},
|
||||
{"aaa": "AaaAa", "11": 22, "abcdef": None, "bbb": "aaaAA"})
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"test_input, expected",
|
||||
[
|
||||
(["AAA", "BBB"], ["AAA", "BBB"]),
|
||||
("AAQQ", "AAQQ"),
|
||||
(
|
||||
{"AAA": "AaaAa", "11": 22, "AbCdEf": None, "bbb": "aaaAA"},
|
||||
{"aaa": "AaaAa", "11": 22, "abcdef": None, "bbb": "aaaAA"},
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_lower_keys(test_input, expected):
|
||||
print(lower_keys.__code__.co_filename)
|
||||
assert lower_keys(test_input) == expected
|
||||
|
|
|
|||
|
|
@ -66,15 +66,17 @@ def test_container_add_params(test_input, expected):
|
|||
[
|
||||
None, # module
|
||||
{"conmon_pidfile": "bbb"}, # module params
|
||||
{"conmonpidfile": "ccc",
|
||||
{
|
||||
"conmonpidfile": "ccc",
|
||||
"config": {
|
||||
"createcommand": [
|
||||
"podman",
|
||||
"create",
|
||||
"--conmon-pidfile=ccc",
|
||||
"testcont",
|
||||
]}
|
||||
}, # container info
|
||||
]
|
||||
},
|
||||
}, # container info
|
||||
{}, # image info
|
||||
"4.1.1", # podman version
|
||||
],
|
||||
|
|
@ -84,15 +86,17 @@ def test_container_add_params(test_input, expected):
|
|||
[
|
||||
None, # module
|
||||
{"conmon_pidfile": None}, # module params
|
||||
{"conmonpidfile": "ccc",
|
||||
{
|
||||
"conmonpidfile": "ccc",
|
||||
"config": {
|
||||
"createcommand": [
|
||||
"podman",
|
||||
"create",
|
||||
"--conmon-pidfile=ccc",
|
||||
"testcont",
|
||||
]}
|
||||
}, # container info
|
||||
]
|
||||
},
|
||||
}, # container info
|
||||
{}, # image info
|
||||
"4.1.1", # podman version
|
||||
],
|
||||
|
|
@ -102,14 +106,16 @@ def test_container_add_params(test_input, expected):
|
|||
[
|
||||
None, # module
|
||||
{"conmon_pidfile": None}, # module params
|
||||
{"conmonpidfile": None,
|
||||
{
|
||||
"conmonpidfile": None,
|
||||
"config": {
|
||||
"createcommand": [
|
||||
"podman",
|
||||
"create",
|
||||
"testcont",
|
||||
]}
|
||||
}, # container info
|
||||
]
|
||||
},
|
||||
}, # container info
|
||||
{}, # image info
|
||||
"4.1.1", # podman version
|
||||
],
|
||||
|
|
@ -118,15 +124,17 @@ def test_container_add_params(test_input, expected):
|
|||
(
|
||||
[
|
||||
None, # module
|
||||
{"conmon_pidfile": 'aaa'}, # module params
|
||||
{"conmonpidfile": None,
|
||||
{"conmon_pidfile": "aaa"}, # module params
|
||||
{
|
||||
"conmonpidfile": None,
|
||||
"config": {
|
||||
"createcommand": [
|
||||
"podman",
|
||||
"create",
|
||||
"testcont",
|
||||
]}
|
||||
}, # container info
|
||||
]
|
||||
},
|
||||
}, # container info
|
||||
{}, # image info
|
||||
"4.1.1", # podman version
|
||||
],
|
||||
|
|
@ -135,16 +143,18 @@ def test_container_add_params(test_input, expected):
|
|||
(
|
||||
[
|
||||
None, # module
|
||||
{"conmon_pidfile": 'aaa'}, # module params
|
||||
{"conmonpidfile": 'aaa',
|
||||
{"conmon_pidfile": "aaa"}, # module params
|
||||
{
|
||||
"conmonpidfile": "aaa",
|
||||
"config": {
|
||||
"createcommand": [
|
||||
"podman",
|
||||
"create",
|
||||
"--conmon-pidfile=aaa",
|
||||
"testcont",
|
||||
]}
|
||||
}, # container info
|
||||
]
|
||||
},
|
||||
}, # container info
|
||||
{}, # image info
|
||||
"4.1.1", # podman version
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue