示例#1
0
 def test_keep_stop_without_trucks_waiting(self):
     state, pollution = doing_pollution("stop", False, 0)
     self.assertFalse(pollution)
     self.assertEqual(state, "stop")
示例#2
0
 def test_go_turn_to_stop_with_trucks_waiting(self):
     state, pollution = doing_pollution("go", True, 1)
     self.assertFalse(pollution)
     self.assertEqual(state, "stop")
示例#3
0
 def test_keep_going_with_trucks_waiting(self):
     state, pollution = doing_pollution("go", True, 0)
     self.assertFalse(pollution)
     self.assertEqual(state, "go")
示例#4
0
 def test_stop_turn_to_go_without_trucks_waiting(self):
     state, pollution = doing_pollution("stop", False, 1)
     self.assertFalse(pollution)
     self.assertEqual(state, "go")
示例#5
0
 def test_keep_stop_with_trucks_waiting(self):
     state, pollution = doing_pollution("stop", True, 0)
     self.assertTrue(pollution)
     self.assertEqual(state, "stop")