Skip to content

Commit 8069b8e

Browse files
committed
black refactoring
1 parent 640641a commit 8069b8e

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

netcompare/runner.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,3 @@ def extract_values_from_output(value: Mapping, path: Mapping, exclude: List) ->
4747
return keys_values_zipper(list_of_reference_keys, filtered_value)
4848
else:
4949
return filtered_value
50-
51-
52-
53-

netcompare/utils/refkey_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ def associate_key_of_my_value(paths: Mapping, wanted_value: List) -> List:
9999
temp_dict.update({my_key_value_list[my_index]: my_value})
100100
final_list.append(temp_dict)
101101

102-
return final_list
102+
return final_list

tests/test_refkey.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"""
99

1010
keys_cleaner_case_1 = (
11-
{'10.1.0.0': {'address_family': 'ipv4'}},
12-
['10.1.0.0'],
11+
{"10.1.0.0": {"address_family": "ipv4"}},
12+
["10.1.0.0"],
1313
)
1414

1515
keys_zipper_case_1 = (
16-
['10.1.0.0', '10.2.0.0'],
17-
[{'is_enabled': False, 'is_up': False}, {'is_enabled': True, 'is_up': True}],
18-
[{'10.1.0.0': {'is_enabled': False, 'is_up': False }}, {'10.2.0.0': {'is_enabled': True, 'is_up': True}}]
16+
["10.1.0.0", "10.2.0.0"],
17+
[{"is_enabled": False, "is_up": False}, {"is_enabled": True, "is_up": True}],
18+
[{"10.1.0.0": {"is_enabled": False, "is_up": False}}, {"10.2.0.0": {"is_enabled": True, "is_up": True}}],
1919
)
2020

2121
keys_association_case_1 = (
2222
"global.peers.*.[is_enabled,is_up]",
2323
[[True, False], [True, False]],
24-
[{'is_enabled': True, 'is_up': False}, {'is_enabled': True, 'is_up': False}]
24+
[{"is_enabled": True, "is_up": False}, {"is_enabled": True, "is_up": False}],
2525
)
2626

2727
keys_cleaner_tests = [
@@ -42,11 +42,13 @@ def test_value_parser(wanted_key, expected_output):
4242
output = keys_cleaner(wanted_key)
4343
assert expected_output == output, assertion_failed_message.format(output=output, expected_output=expected_output)
4444

45+
4546
@pytest.mark.parametrize("ref_keys, wanted_values, expected_output", keys_zipper_tests)
4647
def test_value_parser(ref_keys, wanted_values, expected_output):
4748
output = keys_values_zipper(ref_keys, wanted_values)
4849
assert expected_output == output, assertion_failed_message.format(output=output, expected_output=expected_output)
4950

51+
5052
@pytest.mark.parametrize("path, wanted_values, expected_output", keys_association_test)
5153
def test_value_parser(path, wanted_values, expected_output):
5254
output = associate_key_of_my_value(path, wanted_values)

0 commit comments

Comments
 (0)