def test_count_total(): things = task_7_2a.count_total() things.buy(15) things.buy(5) return_value_things = things.buy(35) assert return_value_things == 55 items = task_7_2a.count_total() items.buy(115) items.buy(32) return_value_items = items.buy(33) assert return_value_items == 180
def test_count_total(): things = task_7_2a.count_total() things.buy(15) things.buy(5) return_value_things = things.buy(35) assert return_value_things == 55 items = task_7_2a.count_total() items.buy(115) items.buy(32) return_value_items = items.buy(33) assert return_value_items == 180 # проверка что после создания второй функции не изменилась первая return_value_things = things.buy(10) assert return_value_things == 65 return_value_items = items.buy(10) assert return_value_items == 190
def test_attr_buy(): things = task_7_2a.count_total() check_attr_or_method(things, attr='buy')