Skip to content

Commit a840b2f

Browse files
committed
squash: a bit of tweaks of parametrized tests
1 parent 0e72498 commit a840b2f

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

tests/unit/provision/test_ssh.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,16 @@
1616
@pytest.mark.parametrize(
1717
('socket_dir', 'limit_size', 'expected'),
1818
[
19-
(Path('/tmp'), True, Path('/tmp/dummy-id.socket')),
20-
(Path('/very/log/socket/dir/which/is/almost/over/the/limit/but/just/and/soo'), True, None),
19+
(
20+
Path('/tmp'),
21+
True,
22+
Path('/tmp/dummy-id.socket'),
23+
),
24+
(
25+
Path('/very/log/socket/dir/which/is/almost/over/the/limit/but/just/and/soo'),
26+
True,
27+
None,
28+
),
2129
(
2230
Path('/very/log/socket/dir/which/is/over/the/limit/by/itself/and/does/not/need'),
2331
True,

tests/unit/test_convert.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,22 @@ def test_extract_relevancy_field_has_priority():
2828
@pytest.mark.parametrize(
2929
('expected', 'individual'),
3030
[
31-
({'common': {1: 1, 2: 2}, 'individual': [{}, {}]}, [{1: 1, 2: 2}, {1: 1, 2: 2}]),
32-
({'common': {1: 1}, 'individual': [{2: 2}, {3: 3}]}, [{1: 1, 2: 2}, {1: 1, 3: 3}]),
31+
(
32+
{'common': {1: 1, 2: 2}, 'individual': [{}, {}]},
33+
[{1: 1, 2: 2}, {1: 1, 2: 2}],
34+
),
35+
(
36+
{'common': {1: 1}, 'individual': [{2: 2}, {3: 3}]},
37+
[{1: 1, 2: 2}, {1: 1, 3: 3}],
38+
),
3339
(
3440
{'common': {1: 1}, 'individual': [{2: 2}, {3: 3}, {}]},
3541
[{1: 1, 2: 2}, {1: 1, 3: 3}, {1: 1}],
3642
),
37-
({'common': {}, 'individual': [{1: 1, 2: 2}, {3: 3}]}, [{1: 1, 2: 2}, {3: 3}]),
43+
(
44+
{'common': {}, 'individual': [{1: 1, 2: 2}, {3: 3}]},
45+
[{1: 1, 2: 2}, {3: 3}],
46+
),
3847
(
3948
{'common': {}, 'individual': [{1: 1, 2: 2}, {3: 3}, {3: 3, 4: 4}]},
4049
[{1: 1, 2: 2}, {3: 3}, {3: 3, 4: 4}],

tests/unit/test_try.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
{'image_and_how': ('fedora@virtual',), 'arch': 'aarch64'},
1717
{'image': 'fedora', 'how': 'virtual', 'arch': 'aarch64'},
1818
),
19-
({'image_and_how': (), 'arch': 'aarch64'}, {'arch': 'aarch64'}),
19+
(
20+
{'image_and_how': (), 'arch': 'aarch64'},
21+
{'arch': 'aarch64'},
22+
),
2023
],
2124
)
2225
def test_options_arch(params: dict[str, Any], expected: dict[str, Any]):

0 commit comments

Comments
 (0)