Exemplo n.º 1
0
 def test_tgreenOff(self):
     """
     test right green off
     """
     trafficLight = TrafficLight()
     trafficLight.tgreenOff()
     self.assertFalse(trafficLight.whatsOn()[5])
Exemplo n.º 2
0
 def test_greenOn(self):
     """
     test green on
     """
     trafficLight = TrafficLight()
     trafficLight.greenOn()
     self.assertTrue(trafficLight.whatsOn()[4])
Exemplo n.º 3
0
 def test_tgreenOn(self):
     """
     test right green on
     """
     trafficLight = TrafficLight()
     trafficLight.tgreenOn()
     self.assertTrue(trafficLight.whatsOn()[5])
Exemplo n.º 4
0
 def test_torangeOn(self):
     """
     test right orange on
     """
     trafficLight = TrafficLight()
     trafficLight.torangeOn()
     self.assertTrue(trafficLight.whatsOn()[3])
Exemplo n.º 5
0
 def test_torangeOff(self):
     """
     test right orange off
     """
     trafficLight = TrafficLight()
     trafficLight.torangeOff()
     self.assertFalse(trafficLight.whatsOn()[3])
Exemplo n.º 6
0
 def test_tredOff(self):
     """
     test right red off
     """
     trafficLight = TrafficLight()
     trafficLight.tredOff()
     self.assertFalse(trafficLight.whatsOn()[1])
Exemplo n.º 7
0
 def test_orangeOn(self):
     """
     test orange on
     """
     trafficLight = TrafficLight()
     trafficLight.orangeOn()
     self.assertTrue(trafficLight.whatsOn()[2])
Exemplo n.º 8
0
 def test_redOff(self):
     """
     Test red off
     """
     trafficLight = TrafficLight()
     trafficLight.redOff()
     self.assertFalse(trafficLight.whatsOn()[0])
Exemplo n.º 9
0
 def test_tredOn(self):
     """
     test right red on
     """
     trafficLight = TrafficLight()
     trafficLight.tredOn()
     self.assertTrue(trafficLight.whatsOn()[1])
Exemplo n.º 10
0
 def test_redOn(self):
     """
     Test red on
     """
     trafficLight = TrafficLight()
     trafficLight.redOn()
     self.assertTrue(trafficLight.whatsOn()[0])
Exemplo n.º 11
0
 def test_TLAttr(self):
     """
     Test the attributes are set correctly
     """
     trafficLight = TrafficLight()
     self.assertEqual(
         trafficLight.whatsOn(), [True, True, False, False, False, False]
     )
Exemplo n.º 12
0
 def test_greenOff(self):
     trafficLight = TrafficLight()
     trafficLight.greenOff()
     self.assertFalse(trafficLight.whatsOn()[4])
Exemplo n.º 13
0
 def test_orangeOff(self):
     trafficLight = TrafficLight()
     trafficLight.orangeOff()
     self.assertFalse(trafficLight.whatsOn()[2])
Exemplo n.º 14
0
 def test_TLAttr(self):
     trafficLight = TrafficLight()
     self.assertEqual(trafficLight.whatsOn(),
                      [True, True, False, False, False, False])