Пример #1
0
 def test_2(self):
     actual = median.checkio([3, 1, 2, 5, 3])
     self.assertEqual(actual, 3)
Пример #2
0
 def test_4(self):
     actual = median.checkio([3, 6, 20, 99, 10, 15])
     self.assertEqual(actual, 12.5)
Пример #3
0
 def test_1(self):
     actual = median.checkio([1, 2, 3, 4, 5])
     self.assertEqual(actual, 3)
Пример #4
0
 def test_Extra(self):
     for i in self.TESTS['Extra']:
         assert checkio(i['input']) == i['answer']
Пример #5
0
 def test_3(self):
     actual = median.checkio([1, 300, 2, 200, 1])
     self.assertEqual(actual, 2)
Пример #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)
Пример #7
0
 def test_Basics(self):
     for i in self.TESTS['Basics']:
         assert checkio(i['input']) == i['answer']
Пример #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)
Пример #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)
Пример #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)
Пример #11
0
 def test_2(self):
     actual = median.checkio([3, 1, 2, 5, 3])
     self.assertEqual(actual, 3)
Пример #12
0
 def test_1(self):
     actual = median.checkio([1, 2, 3, 4, 5])
     self.assertEqual(actual, 3)
Пример #13
0
 def test_4(self):
     actual = median.checkio([3, 6, 20, 99, 10, 15])
     self.assertEqual(actual, 12.5)
Пример #14
0
 def test_3(self):
     actual = median.checkio([1, 300, 2, 200, 1])
     self.assertEqual(actual, 2)