1viktors_ingredients = ['чушки', 'домати', 'моркови', 'ябълки', 'сол', 'черен пипер', 'кимион', 'зехтин']
2
3georgis_ingredients = ('чушки', 'домати', 'патладжан', 'люти чушки', 'олио', 'захар', 'чубрица', 'черен пипер', 'врачанска ракия')
4
5#shopping_list = [georgis_ingredients[::-1], list(viktors_ingredients[::-1])] -> this is another way but the other one seemed more readable
6shopping_list = viktors_ingredients
7shopping_list.extend(list(georgis_ingredients))
8shopping_list = shopping_list[::-1]
9
10unique_ingredients = set(shopping_list)
11# unique_ingredients = shopping_list[1]
12# unique_ingredients.extend(list(shopping_list[0])) -> this was for the first way I wrote
13
14ingredient_quantities = dict.fromkeys(unique_ingredients, 5)
15ingredient_quantities['skyr'] = 1
16
17number_of_ingredients_to_buy = len(ingredient_quantities)
......F.
======================================================================
FAIL: test_viktors_ingredients (test.TestLyutenitsa.test_viktors_ingredients)
Viktor's ingredients should match the recipe.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 11, in test_viktors_ingredients
self.assertEqual(viktors_ingredients,
AssertionError: Lists differ: ['чуш[71 chars]хтин', 'чушки', 'домати', 'патладжан', 'люти ч[63 chars]кия'] != ['чуш[71 chars]хтин']
First list contains 9 additional elements.
First extra element 8:
'чушки'
['чушки',
'домати',
'моркови',
'ябълки',
'сол',
'черен пипер',
'кимион',
- 'зехтин',
? ^
+ 'зехтин']
? ^
- 'чушки',
- 'домати',
- 'патладжан',
- 'люти чушки',
- 'олио',
- 'захар',
- 'чубрица',
- 'черен пипер',
- 'врачанска ракия']
----------------------------------------------------------------------
Ran 8 tests in 0.001s
FAILED (failures=1)