def testCandles(self): arr = [10, 11, 12, 13, 14] self.assertEqual(birthdayCakeCandles(5, arr), 1)
def test_none_values(self): self.assertEquals(birthdayCakeCandles(None), 0)
def test_empty_values(self): self.assertEquals(birthdayCakeCandles([]), 0)
def test_single_input_value(self): self.assertEquals(birthdayCakeCandles([3]), 1)
def test_single_return_value(self): self.assertEquals(birthdayCakeCandles([3, 2, 1, 4]), 1)
def test_sorted_desc_values(self): self.assertEquals(birthdayCakeCandles([3, 3, 2, 1]), 2)
def test_sorted_asc_values(self): self.assertEquals(birthdayCakeCandles([1, 2, 3, 3]), 2)
def test_unsorted_values(self): self.assertEquals(birthdayCakeCandles([3, 2, 1, 3]), 2)