示例#1
0
 def test_sevens_in_a_row(self):
     self.assertEqual(True,
                      sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
     self.assertEqual(False, sevens_in_a_row([1, 7, 1, 7, 7], 4))
     self.assertEqual(True,
                      sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
     self.assertEqual(True, sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#2
0
 def test_problem_statement_cases(self):
     self.assertEqual(True,
                      sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
     self.assertEqual(False, sevens_in_a_row([1, 7, 1, 7, 7], 4))
     self.assertEqual(True,
                      sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
     self.assertEqual(True, sevens_in_a_row([7, 2, 1, 6, 2], 1))
 def test_sevens_in_a_row(self):
     self.assertTrue(
         solution.sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
     self.assertFalse(solution.sevens_in_a_row([1, 7, 1, 7, 7], 4))
     self.assertTrue(
         solution.sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
     self.assertTrue(solution.sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#4
0
 def test_sevens_in_a_row(self):
     self.assertTrue(True, sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
     # True
     self.assertFalse(False, sevens_in_a_row([1, 7, 1, 7, 7], 4))
     # False
     self.assertTrue(True, sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
     # True
     self.assertTrue(True, sevens_in_a_row([7, 2, 1, 6, 2], 1))
 def test_sevens_in_a_row(self):
     self.assertEqual(sevens_in_a_row([10,8,7,6,7,7,7,20,-7], 3), True)
     self.assertEqual(sevens_in_a_row([1,7,1,7,7], 4), False)
     self.assertEqual(sevens_in_a_row([7,7,7,1,1,1,7,7,7,7], 3), True)
     self.assertEqual(sevens_in_a_row([7,2,1,6,2], 1), True)
     self.assertEqual(sevens_in_a_row([7,2,1,6,2], 2), False)
     self.assertEqual(sevens_in_a_row([7,2,-7,7,7,4,7,7,7,1,6,2], 3), True)
     self.assertEqual(sevens_in_a_row([2,1,6,2], 0), True)
 def test_sevens_in_a_row4(self):
     self.assertEqual(False, solution.sevens_in_a_row([22, 23, 24, 25], 6))
示例#7
0
 def test_four(self):
     self.assertTrue(sevens_in_a_row([7, 2, 1, 6, 2], 1))
	def test_sevens_in_a_row_2nd(self):
		self.assertEqual("False", solution.sevens_in_a_row([1,7,1,7,7], 4))
示例#9
0
	def test_sevens_in_a_row2(self):
		self.assertEqual(False, solution.sevens_in_a_row([1,7,1,7,7], 4))
示例#10
0
	def test_sevens_in_a_row3(self):
		self.assertEqual(True, solution.sevens_in_a_row([7,7,7,1,1,1,7,7,7,7], 3))
示例#11
0
 def test_sevens_in_a_row_1(self):
     self.assertEqual(False, sevens_in_a_row([1, 7, 1, 7, 7], 4))
示例#12
0
 def testing_sevens_in_a_row2(self):
     self.assertFalse(sevens_in_a_row([1, 7, 1, 7, 7], 4))  
示例#13
0
 def test_false(self):
     self.assertFalse(solution.sevens_in_a_row([1, 7, 1, 7, 7], 4))
示例#14
0
 def test_true(self):
     self.assertTrue(
         solution.sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
示例#15
0
 def test_true_in_the_beginning(self):
     self.assertTrue(solution.sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#16
0
 def test_true_more_sevens_in_a_row(self):
     self.assertTrue(
         solution.sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
 def test_sevens_in_a_row2(self):
     self.assertEqual(True, solution.sevens_in_a_row([10, 10, 10, 10], 0))
示例#18
0
 def testing_sevens_in_a_row4(self):
     self.assertTrue(sevens_in_a_row([7, 2, 1, 6, 2], 1))
	def test_sevens_in_a_row_4(self):
		self.assertEqual(True, solution.sevens_in_a_row([7,2,1,6,2], 1))
示例#20
0
 def test_sevens_in_a_row_2(self):
     self.assertEqual(True, sevens_in_a_row([7, 2, 1, 6, 2], 1))
	def test_sevens_in_a_row_2(self):
		self.assertEqual(False, solution.sevens_in_a_row([1,7,1,7,7], 4))
示例#22
0
 def test_one(self):
     self.assertTrue(sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
 def test_sevens_in_a_row3(self):
     self.assertEqual(
         True, solution.sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 4))
示例#24
0
	def test_sevens_in_a_row5(self):
		self.assertEqual(True, solution.sevens_in_a_row([7,7,7,3,7,7,7,7,7], 4))
 def test_sevens_in_a_row4(self):
     self.assertEqual(False, solution.sevens_in_a_row([22, 23, 24, 25], 6))
示例#26
0
 def test_three(self):
     self.assertTrue(sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
 def test_sevens_in_a_row5(self):
     self.assertEqual(False, solution.sevens_in_a_row([], 4))
示例#28
0
 def test_three(self):
     self.assertTrue(sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
 def test_sevens_in_a_row1(self):
     self.assertEqual(
         True, solution.sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
示例#30
0
 def test_two(self):
     self.assertFalse(sevens_in_a_row([1, 7, 1, 7, 7], 4))  
 def test_sevens_in_a_row2(self):
     self.assertEqual(True, solution.sevens_in_a_row([10, 10, 10, 10], 0))
 def test_sevens_in_a_row5(self):
     self.assertEqual(False, solution.sevens_in_a_row([], 4))
示例#33
0
 def test_(self):
     self.assertEqual(True,
                      sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
示例#34
0
 def testing_sevens_in_a_row3(self):
     self.assertTrue(sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
示例#35
0
 def test_(self):
     self.assertEqual(True, sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#36
0
 def testing_sevens_in_a_row1(self):
     self.assertTrue(sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
示例#37
0
 def test_(self):
     self.assertEqual(True,
                      sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
示例#38
0
	def test_solution(self):
		self.assertEqual(True, sevens_in_a_row([10,8,7,6,7,7,7,20,-7], 3))
		self.assertEqual(False, sevens_in_a_row([1,7,1,7,7], 4))
		self.assertEqual(True, sevens_in_a_row([7,7,7,1,1,1,7,7,7,7], 3))
		self.assertEqual(True, sevens_in_a_row([7,2,1,6,2], 1))
示例#39
0
 def test_true_in_the_beginning(self):
     self.assertTrue(solution.sevens_in_a_row([7,2,1,6,2], 1))
示例#40
0
 def test_sevens_in_a_row_0(self):
     self.assertEqual(True, sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
示例#41
0
 def test_false(self):
     self.assertFalse(solution.sevens_in_a_row([1,7,1,7,7], 4))
示例#42
0
 def test_(self):
     self.assertEqual(False, sevens_in_a_row([1, 7, 1, 7, 7], 4))
示例#43
0
 def test_four(self):
     self.assertTrue(sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#44
0
 def test_true(self):
     self.assertTrue(solution.sevens_in_a_row([10,8,7,6,7,7,7,20,-7], 3))
示例#45
0
文件: test.py 项目: gshopov/the-stash
 def test_always_returns_true_with_number_0(self):
     self.assertTrue(solution.sevens_in_a_row([1, 2, 3], 0))
     self.assertTrue(solution.sevens_in_a_row([7, 7, 7, 1, 7], 0))
示例#46
0
 def test_true_more_sevens_in_a_row(self):
     self.assertTrue(solution.sevens_in_a_row([7,7,7,1,1,1,7,7,7,7], 3))
示例#47
0
 def test_sevens_in_a_row(self):
     self.assertTrue(solution.sevens_in_a_row([7, 7, 7], 3))
     self.assertFalse(solution.sevens_in_a_row([7, 7, 7], 4))
     self.assertTrue(solution.sevens_in_a_row([1, 2, 7, 7, 7, 3, 7, 9], 3))
     self.assertTrue(solution.sevens_in_a_row([1, 2, 9], 0))
示例#48
0
	def test_sevens_in_a_row4(self):
		self.assertEqual(True, solution.sevens_in_a_row([7,2,1,6,2], 1))
	def test_sevens_in_a_row_3rd(self):
		self.assertEqual("True", solution.sevens_in_a_row([7,7,7,1,1,1,7,7,7,7], 3))
示例#50
0
	def test_sevens_in_a_row1(self):
		self.assertEqual(True, solution.sevens_in_a_row([10,8,7,6,7,7,7,20,-7], 3))
	def test_sevens_in_a_row_4th(self):
		self.assertEqual("True", solution.sevens_in_a_row([7,2,1,6,2], 1))
示例#52
0
 def test_sevens_in_a_row(self):
     self.assertTrue(sevens_in_a_row([10, 8, 7, 6, 7, 7, 7, 20, -7], 3))
     self.assertTrue(not sevens_in_a_row([1, 7, 1, 7, 7], 4))
     self.assertTrue(sevens_in_a_row([7, 7, 7, 1, 1, 1, 7, 7, 7, 7], 3))
     self.assertTrue(sevens_in_a_row([7, 2, 1, 6, 2], 1))
示例#53
0
 def test_two(self):
     self.assertFalse(sevens_in_a_row([1, 7, 1, 7, 7], 4))