def test_biggest_difference(self):
     self.assertEqual(biggest_difference([1, 2, 3]), -2)
     self.assertEqual(biggest_difference([0, 0, 1, 8, 9, 1, 0, 5]), -9)
     self.assertEqual(biggest_difference([4, 8, 9]), -5)
     self.assertEqual(biggest_difference([-7, 0, 0, 0]), -7)
     self.assertEqual(biggest_difference([1, 4, 5, -5, 7, 0, 8]), -13)
     self.assertEqual(biggest_difference([1,2]), -1)
     self.assertEqual(biggest_difference(range(100)), -99)
示例#2
0
 def test_biggest_difference(self):
     self.assertEqual(biggest_difference([1, 2, 3]), -2)
     self.assertEqual(biggest_difference([0, 0, 1, 8, 9, 1, 0, 5]), -9)
     self.assertEqual(biggest_difference([4, 8, 9]), -5)
     self.assertEqual(biggest_difference([-7, 0, 0, 0]), -7)
     self.assertEqual(biggest_difference([1, 4, 5, -5, 7, 0, 8]), -13)
     self.assertEqual(biggest_difference([1, 2]), -1)
     self.assertEqual(biggest_difference(range(100)), -99)
示例#3
0
 def test_array_of_equals(self):
     test_array = [2,2,2,2,2]
     self.assertEqual(0, solution.biggest_difference(test_array))
示例#4
0
 def test_with_negative_integers(self):
     test_array = [-10, -9, -1]
     self.assertEqual(-9, solution.biggest_difference(test_array))
示例#5
0
 def test_three(self):
     self.assertEqual(-9, biggest_difference([-10, -9, -1]))
示例#6
0
 def test_one(self):
     self.assertEqual(-1, biggest_difference([1,2]))
示例#7
0
 def test_negative_numbers(self):
     self.assertEqual(-9, solution.biggest_difference([-10, -9, -1]))
 def test_biggest_difference4(self):
     self.assertEqual(-100, solution.biggest_difference(range(50, 151)))
示例#9
0
 def test_biggest_difference(self):
     self.assertEqual(-1, biggest_difference([1, 2]))
     self.assertEqual(-4, biggest_difference([1, 2, 3, 4, 5]))
     self.assertEqual(-9, biggest_difference([-10, -9, -1]))
     self.assertEqual(-99, biggest_difference(range(100)))
	def test_biggest_difference_2(self):
		self.assertEqual(-4, solution.biggest_difference([1,2,3,4,5]))
示例#11
0
 def test_empty_array(self):
     test_array = []
     self.assertEqual(False, solution.biggest_difference(test_array))
示例#12
0
 def test_two_numbers(self):
     self.assertEqual(-1,solution.biggest_difference([1,2]))
示例#13
0
 def test_with_negative_integers(self):
     test_array = [-10, -9, -1]
     self.assertEqual(-9, solution.biggest_difference(test_array))
示例#14
0
 def test_ordinary_array(self):
     test_array = [5, 2, 7, 9]
     self.assertEqual(-7, solution.biggest_difference(test_array))
示例#15
0
 def test_array_of_equals(self):
     test_array = [2, 2, 2, 2, 2]
     self.assertEqual(0, solution.biggest_difference(test_array))
示例#16
0
 def test_problem_statement_cases(self):
     self.assertEqual(-1, biggest_difference([1,2]))
     self.assertEqual(-4, biggest_difference([1,2,3,4,5]))
     self.assertEqual(-9, biggest_difference([-10, -9, -1]))
     self.assertEqual(-99, biggest_difference(range(100)))
 def test_biggest_difference5(self):
     self.assertEqual(-12, solution.biggest_difference(range(-10, 3)))
示例#18
0
 def test_negative_numbers(self):
     self.assertEqual(-9,solution.biggest_difference([-10,-9,-1]))
示例#19
0
 def test_four(self):
     self.assertEqual(-99, biggest_difference(range(100)))
	def test_biggest_difference_4(self):
		self.assertEqual(-99, solution.biggest_difference(range(100)))
示例#21
0
 def test1(self):
     self.assertEqual(-3, solution.biggest_difference([0, 1, 2, 3]))
示例#22
0
 def test_biggest_difference_1(self):
     self.assertEqual(-1, solution.biggest_difference([1, 2]))
示例#23
0
 def test2(self):
     self.assertEqual(-21, solution.biggest_difference([22, 1, 11, 20, 13]))
示例#24
0
 def test_two_numbers(self):
     self.assertEqual(-1, solution.biggest_difference([1, 2]))
示例#25
0
 def test_ordinary_array(self):
     self.assertEqual(-4, solution.biggest_difference([1,2,3,4,5]))
示例#26
0
	def test_biggest_difference_1(self):
		self.assertEqual(-7, biggest_difference([7, 9, 3, 6, 2]))
示例#27
0
 def test_with_negative_integers(self):
     self.assertEqual(-9, solution.biggest_difference([-10, -9, -1]))
示例#28
0
 def test_four(self):
     self.assertEqual(-99, biggest_difference(range(100)))
示例#29
0
 def test_array_of_equals(self):
     self.assertEqual(0, solution.biggest_difference([1,1,1,1,1]))
示例#30
0
 def test_two(self):
     self.assertEqual(-4, biggest_difference([1,2,3,4,5]))
示例#31
0
 def test_empty_array(self):
     self.assertEqual(0, solution.biggest_difference(None))
示例#32
0
 def test_ordinary_array(self):
     test_array = [5, 2, 7, 9]
     self.assertEqual(-7, solution.biggest_difference(test_array))
示例#33
0
 def test_empty_array(self):
     self.assertEqual(-1, solution.biggest_difference([1, 2]))
示例#34
0
 def test_empty_array(self):
     test_array = []
     self.assertEqual(False, solution.biggest_difference(test_array))
示例#35
0
 def test_with_long_array(self):
     self.assertEqual(-4, solution.biggest_difference([1,2,3,4,5]))
示例#36
0
 def test_more_numbers(self):
     self.assertEqual(-4,solution.biggest_difference([1,2,3,4,5]))
示例#37
0
 def test_with_one_number_array(self):
     self.assertEqual(0, solution.biggest_difference([1]))
 def test_biggest_difference(self):
     self.assertEqual(-1, biggest_difference([1, 2]))
     self.assertEqual(-4, biggest_difference([1, 2, 3, 4, 5]))
     self.assertEqual(-9, biggest_difference([-10, -9, -1]))
     self.assertEqual(-99, biggest_difference(range(100)))
示例#39
0
 def test_with_two_numbers_array(self):
     self.assertEqual(-2, solution.biggest_difference([1,3]))
	def test_biggest_difference_3(self):
		self.assertEqual(-9, solution.biggest_difference([-10, -9, -1]))
示例#41
0
 def test_three(self):
     self.assertEquals(-9, biggest_difference([-10, -9, -1]))
	def test_biggest_difference_1(self):
		self.assertEqual(-1, solution.biggest_difference([1,2]))
示例#43
0
 def test_vore(self):
     self.assertEquals(-99, biggest_difference(range(100)))
示例#44
0
 def test_biggest_difference_3(self):
     self.assertEqual(-9, solution.biggest_difference([-10, -9, -1]))
示例#45
0
 def test_one(self):
     self.assertEquals(-1, biggest_difference([1, 2]))
示例#46
0
 def test_biggest_difference_2(self):
     self.assertEqual(-4, solution.biggest_difference([1, 2, 3, 4, 5]))
示例#47
0
 def test_two(self):
     self.assertEquals(-4, biggest_difference([1, 2, 3, 4, 5]))
示例#48
0
 def test_range(self):
     self.assertEqual(-99, solution.biggest_difference(range(100)))
示例#49
0
	def test_biggest_difference_2(self):
		self.assertEqual(-3, biggest_difference([7, 10]))
示例#50
0
 def test_more_numbers(self):
     self.assertEqual(-4, solution.biggest_difference([1, 2, 3, 4, 5]))
示例#51
0
	def test_biggest_difference_0(self):
		self.assertEqual(-6, biggest_difference([2, 8, 4, 3]))