示例#1
0
 def test_brightness_can_not_be_negative(self):
     self.assertEqual(update_light('turn off', 0), 0)
示例#2
0
 def test_returns_correct_result(self):
     self.assertEqual(update_light('toggle', 0), 2)
     self.assertEqual(update_light('turn on', 0), 1)
     self.assertEqual(update_light('turn off', 1), 0)