def test_calc_toxin(self): """ Test if we get proper toxin level """ toxins_group = Composite(TOXINS) bacterium = create_bacterium(BACTERIA, 0) for i in range(TEST_TOX_NUM): toxins_group += create_toxin(TOXINS, i) toxin_strength = calc_toxin(toxins_group, bacterium) self.assertTrue(toxin_strength < 0)
def test_create_nutrient(self): """ Test to see if nutrient is created """ new_nutrient = create_toxin(NUTRIENTS, 0) self.assertTrue(new_nutrient["max_move"] >= 0)
def setUp(self): self.toxin = create_toxin(TOXINS, TEST_TOX_NUM) self.nutrient = create_nutrient(NUTRIENTS, TEST_NUTRI_NUM) self.bacterium = create_bacterium(BACTERIA, TEST_BAC_NUM)
def test_create_toxin(self): """ Test to see if toxin is created """ new_toxin = create_toxin(TOXINS, 0) self.assertTrue(new_toxin["max_move"] >= 0)
def setUp(self): set_up() self.toxin = create_toxin("Toxins", TEST_TOX_NUM) self.nutrient = create_nutrient("Nutrients", TEST_NUTRI_NUM) self.bacterium = create_bacterium("Bacteria", TEST_BAC_NUM)