Skip to content

Commit c224d7c

Browse files
authored
[Mecha Munch Management] Add test case for send_to_store of extra item on isle_mapping (#3653)
1 parent 55a0ab4 commit c224d7c

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

exercises/concept/mecha-munch-management/dict_methods_test.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def test_add_item(self):
3131
f'expected: {expected} once the item was added.')
3232

3333
self.assertEqual(actual_result, expected, msg=error_msg)
34-
3534

3635
@pytest.mark.task(taskno=2)
3736
def test_read_notes(self):
@@ -130,12 +129,20 @@ def test_send_to_store(self):
130129
'Yoghurt': ['Aisle 2', True], 'Milk': ['Aisle 2', True]}),
131130

132131
({'Apple': 2, 'Raspberry': 2, 'Blueberries': 5,
133-
'Broccoli' : 2, 'Kiwi': 1, 'Melon': 4},
132+
'Broccoli': 2, 'Kiwi': 1, 'Melon': 4},
134133

135134
{'Apple': ['Aisle 1', False], 'Raspberry': ['Aisle 6', False],
136135
'Blueberries': ['Aisle 6', False], 'Broccoli': ['Aisle 3', False],
137-
'Kiwi': ['Aisle 6', False], 'Melon': ['Aisle 6', False]})
138-
]
136+
'Kiwi': ['Aisle 6', False], 'Melon': ['Aisle 6', False]}),
137+
138+
({'Orange': 1},
139+
{'Banana': ['Aisle 5', False], 'Apple': ['Aisle 4', False],
140+
'Orange': ['Aisle 4', False], 'Milk': ['Aisle 2', True]}),
141+
142+
({'Banana': 3, 'Apple': 2, 'Orange': 1},
143+
{'Banana': ['Aisle 5', False], 'Apple': ['Aisle 4', False],
144+
'Orange': ['Aisle 4', False], 'Milk': ['Aisle 2', True]}),
145+
]
139146

140147
output_data = [
141148
{'Orange': [1, 'Aisle 4', False], 'Milk': [2, 'Aisle 2', True],
@@ -146,8 +153,13 @@ def test_send_to_store(self):
146153

147154
{'Raspberry': [2, 'Aisle 6', False], 'Melon': [4, 'Aisle 6', False],
148155
'Kiwi': [1, 'Aisle 6', False], 'Broccoli': [2, 'Aisle 3', False],
149-
'Blueberries': [5, 'Aisle 6', False], 'Apple': [2, 'Aisle 1', False]}
150-
]
156+
'Blueberries': [5, 'Aisle 6', False], 'Apple': [2, 'Aisle 1', False]},
157+
158+
{'Orange': [1, 'Aisle 4', False]},
159+
160+
{'Orange': [1, 'Aisle 4', False], 'Banana': [3, 'Aisle 5', False],
161+
'Apple': [2, 'Aisle 4', False]},
162+
]
151163

152164
for variant, (input_data, expected) in enumerate(zip(input_data, output_data), start=1):
153165
with self.subTest(f'variation #{variant}', input_data=input_data, expected=expected):

0 commit comments

Comments
 (0)