test = {'name': 'q5',
 'points': 1,
 'suites': [{'cases': [{'code': '>>> tomato = Item("tomato", 4, "vegetable")\n'
                                '\n'
                                '>>> tomato\n'
                                'tomato\n'
                                '\n'
                                '>>> tomato = Item("tomato", 4, "vegetable")\n'
                                '\n'
                                '>>> apple = Item("apple", 2, "fruit")\n'
                                '\n'
                                '>>> chicken = Item("chicken", 3, "meat")\n'
                                '\n'
                                '>>> oreos = Item("oreos", 6, "junk_food")\n'
                                '\n'
                                '>>> stuff = GroceryList([tomato, apple, '
                                'chicken, oreos])\n'
                                '\n'
                                '>>> stuff.items\n'
                                '[tomato, apple, chicken, oreos]\n'
                                '\n'
                                '>>> stuff = GroceryList([tomato, apple, '
                                'chicken, oreos])\n'
                                '\n'
                                '>>> stuff.buy_cheapest()\n'
                                '\n'
                                '>>> stuff.items\n'
                                '[tomato, chicken, oreos]\n'
                                '\n'
                                '>>> stuff = GroceryList([tomato, apple, '
                                'chicken, oreos])\n'
                                '\n'
                                '>>> stuff.buy_item("apple")\n'
                                '\n'
                                '>>> stuff.items\n'
                                '[tomato, chicken, oreos]\n'
                                '\n'
                                '>>> [item for item in stuff.generate_list(10, '
                                '["meat"])]\n'
                                '[chicken]\n'
                                '\n'
                                '>>> grocery_list = stuff.generate_list(10, '
                                '["meat"])\n'
                                '\n'
                                '>>> next(grocery_list)\n'
                                'chicken\n'}],
             'scored': True,
             'setup': '>>> from q5 import *',
             'type': 'doctest'}]}