Sha256: 8af12a6415f886f578e22e314785a1eb3f7d7236d727e011933ff490495a42f3
Contents?: true
Size: 1.46 KB
Versions: 127
Compression:
Stored size: 1.46 KB
Contents
import unittest from kindergarten_garden import Garden class KindergartenGardenTests(unittest.TestCase): def test_alices_garden(self): self.assertEqual("Radishes Clover Grass Grass".split(), Garden("RC\nGG").plants("Alice")) def test_bob_and_charlies_gardens(self): garden = Garden("VVCCGG\nVVCCGG") self.assertEqual(["Clover"] * 4, garden.plants("Bob")) self.assertEqual(["Grass"] * 4, garden.plants("Charlie")) def test_full_garden(self): garden = Garden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV") self.assertEqual("Violets Radishes Violets Radishes".split(), garden.plants("Alice")) self.assertEqual("Clover Grass Clover Clover".split(), garden.plants("Bob")) self.assertEqual("Grass Clover Clover Grass".split(), garden.plants("Kincaid")) self.assertEqual("Grass Violets Clover Violets".split(), garden.plants("Larry")) def test_disordered_test(self): garden = Garden("VCRRGVRG\nRVGCCGCV", students="Samantha Patricia Xander Roger".split()) self.assertEqual("Violets Clover Radishes Violets".split(), garden.plants("Patricia")) self.assertEqual("Radishes Grass Clover Violets".split(), garden.plants("Xander")) if __name__ == '__main__': unittest.main()
Version data entries
127 entries across 127 versions & 1 rubygems