Example #1
0
 def test_2(self):
     actual = median.checkio([3, 1, 2, 5, 3])
     self.assertEqual(actual, 3)
Example #2
0
 def test_4(self):
     actual = median.checkio([3, 6, 20, 99, 10, 15])
     self.assertEqual(actual, 12.5)
Example #3
0
 def test_1(self):
     actual = median.checkio([1, 2, 3, 4, 5])
     self.assertEqual(actual, 3)
Example #4
0
 def test_Extra(self):
     for i in self.TESTS['Extra']:
         assert checkio(i['input']) == i['answer']
Example #5
0
 def test_3(self):
     actual = median.checkio([1, 300, 2, 200, 1])
     self.assertEqual(actual, 2)
Example #6
0
	def test_checkio_with_not_sorted_array_odd_length_returns_3(self):
		result = median.checkio([1, 2, 3, 4, 5])
		self.assertEquals(3, result)
Example #7
0
 def test_Basics(self):
     for i in self.TESTS['Basics']:
         assert checkio(i['input']) == i['answer']
Example #8
0
	def test_checkio_with_not_sorted_array_even_length_returns_12_dot_5(self):
		result = median.checkio([3, 6, 20, 99, 10, 15])
		self.assertEquals(12.5, result)
Example #9
0
	def test_checkio_with_not_sorted_array_even_length_returns_499999_dot_5(self):
		result = median.checkio(range(1000000))
		self.assertEquals(499999.5, result)
Example #10
0
	def test_checkio_with_not_sorted_array_odd_length_not_following_numbers_returns_2(self):
		result = median.checkio([1, 300, 2, 200, 1])
		self.assertEquals(2, result)
Example #11
0
 def test_2(self):
     actual = median.checkio([3, 1, 2, 5, 3])
     self.assertEqual(actual, 3)
Example #12
0
 def test_1(self):
     actual = median.checkio([1, 2, 3, 4, 5])
     self.assertEqual(actual, 3)
Example #13
0
 def test_4(self):
     actual = median.checkio([3, 6, 20, 99, 10, 15])
     self.assertEqual(actual, 12.5)
Example #14
0
 def test_3(self):
     actual = median.checkio([1, 300, 2, 200, 1])
     self.assertEqual(actual, 2)