def test_median_four(self): self.assertEqual(extend.median([4, 1, 3, 2]), 2.5)
def test_median_seven(self): self.assertEqual(extend.median([7,1,3,122,5,3,5,24,9,11,15,8]), 7.5)
def test_median_five(self): self.assertEqual(extend.median([9, 8, 1, 5, 2]), 5)
def test_median_four(self): self.assertEqual(extend.median([7,4,3,5,]), 4.5)
def test_median_four(self): self.assertEqual(extend.median([7,5,3,4]), 4.5)
def test_median_even(self): self.assertEqual(extend.median([5, 4, 2, 3]), 3.5)
def test_median_even_lenght(self): median_list = [1, 3, 8, 9] self.assertEqual(extend.median(median_list), 5.5)
def test_median_five(self): self.assertEqual(extend.median('derrr'), '')
def test_median_with_built_in(self): median_list = [random.randint(1, 500) for i in range(1, 100)] self.assertEqual(statistics.median(median_list), extend.median(median_list))
def test_median_odd_lenght(self): median_list = [1, 3, 5, 8, 9] self.assertEqual(extend.median(median_list), 5)
def test_median_if_duo(self): self.assertEqual(extend.median([2, 5]), 3.5)
def test_median_single(self): self.assertEqual(extend.median([5]), 5)
def test_median_odd(self): self.assertEqual(extend.median([5, 6, 9, 8, 10]), 8)
def test_median_five(self): self.assertEqual(extend.median([1,2,3,4,5]), 3)
def test_median_empty_list(self): self.assertFalse(extend.median([]))
def test_median_five_b(self): self.assertEqual(extend.median([2, 1, 5, 4, 3]), 3)
def test_median_just_negative_unsorted_even(self): median_list = [-5, -1, -55, -9, -4, -3] self.assertEqual(extend.median(median_list), -4.5)
def test_median_five(self): self.assertEqual(extend.median([7, 9, 12, 13, 16]), 12)
def test_median_all_same_number(self): median_list = [2, 2, 2, 2, 2, 2] self.assertEqual(extend.median(median_list), 2)
def test_median_four(self): self.assertEqual(extend.median([7,5,3,5]), 5)
def test_median_four_outputfloat(self): self.assertEqual(extend.median([7,4,3,5]), 4.5)
def test_median_four(self): self.assertEqual(extend.median([9, 6, 1, 2]), 4)
def test_median_string(self): self.assertEqual(extend.median([7, 4, 'four', 5]), 5)
def test_median_five(self): self.assertEqual(extend.median([5, 5, 5, 5]), 5)
def test_median_zero(self): self.assertFalse(extend.median([]), False)
def test_median_three(self): self.assertEqual(extend.median([1, 2, 4, 3]), 3)
def test_median_four_outputfloat(self): self.assertEqual(extend.median([7, 4, 3, 5]), 4.5)
def test_median_five(self): self.assertEqual(extend.median([7,5,3,6]), 5.5)
def test_median_four(self): self.assertEqual(extend.median([1,2,3,4,5,6,7]), 4)
def test_median_four_b(self): self.assertEqual(extend.median([2, 1, 5, 2]), 2)
def test_median_four_b(self): self.assertEqual(extend.median([1, 5, 7, 10]), 6)
def test_median_four(self): self.assertEqual(extend.median([13,9,5,1]), 7)
def test_median_four(self): self.assertEqual(extend.median([1, 2,5,8,9,11]), 6.5)
def test_median_four_is_4d5(self): self.assertEqual(extend.median([7, 5, 3, 4]), 4.5)
def test_median_four(self): self.assertEqual(extend.median([7, 9, 12, 13]), 15)
def test_median_seven_is_4d5(self): self.assertEqual(extend.median([7, 5, 3, 4, 7, 3]), 4.5)
def test_median_type(self): self.assertIsInstance(extend.median([11, 23, 34]), int)
def test_median_six(self): self.assertEqual(extend.median([1,2,3,4]), 2.5)
def test_median_five(self): self.assertEqual(extend.median([2,3,8,4,4]), 4)
def test_median_ten(self): self.assertEqual(extend.median([1,4,2,4,2,3,5,3,1,1]), 2.5)
def test_median_four2(self): self.assertEqual(extend.median([9, 2, 1, 5]), 3.5)