def setup(self):
        self.item_config = ItemConfigurations(Random())

        self.item_config.add_item(
                    ItemConfiguration(name = 'apple',
                                      cost = 1,
                                      weight = 1,
                                      icons = [500, 501],
                                      types = ['food'],
                                      rarity = 'common'))

        self.item_config.add_item(
                    ItemConfiguration(name = 'dagger',
                                      cost = 2,
                                      weight = 1,
                                      icons = [500],
                                      types = ['weapon',
                                               'light weapon',
                                               'melee',
                                               'simple weapon'],
                                      rarity = 'common',
                                      weapon_configration = WeaponConfiguration(
                                            damage = [(2, 'piercing')],
                                            critical_range = 11,
                                            critical_damage = 2,
                                            weapon_class = 'simple')))

        self.item_config.add_item(
                    ItemConfiguration(name = 'healing potion',
                                      cost = 150,
                                      weight = 1,
                                      icons = [100],
                                      types = ['potion'],
                                      rarity = 'rare',
                                      effect_handles = [EffectHandle(
                                            trigger = 'on drink',
                                            effect = 'cure medium wounds',
                                            parameters = None,
                                            charges = 1)]))

        self.item_config.add_item(
            ItemConfiguration(name = 'bag of caltrops',
                              cost = 150,
                              weight = 1,
                              icons = ['icon'],
                              types = ['trap bag'],
                              rarity = 'common',
                              trap_configuration = TrapConfiguration(name = 'caltrops',
                                                                     count = 2)))

        self.generator = ItemGenerator(self.item_config)
Display an alert drop-down message.
dataset/ETHPy150Open tuturto/pyherc/src/pyherc/test/unit/test_itemgeneration.py/TestItemGeneration.setup--crossover with--dataset/ETHPy150Open catap/namebench/cocoa/controller.py/controller.displayError