コード例 #1
0
 def test_is_complete_too_long(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
コード例 #2
0
 def test_is_complete_basic_order(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8, 9]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The basic order of 1-9 is correct.")
コード例 #3
0
 def test_is_complete_too_sum(self):
     test_input = [1, 2, 3, 4, 9, 6, 7, 8, 5]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is very sum.")
コード例 #4
0
 def test_is_complete_empty_true(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8, 9]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is good.")
コード例 #5
0
 def test_is_complete_sum(self):
     test_input = [1, 9, 3, 4, 5, 6, 7, 8, 2]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "Wrong numbers.")
コード例 #6
0
 def test_is_complete_true_check(self):
     test_input = [9, 1, 3, 4, 5, 6, 7, 8, 2]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "Not ok")
コード例 #7
0
 def test_is_complete_sorted_invalid_char(self):
     test_input = [0, 2, 3, 4, 5, 6, 7, 'x', 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "Invalid char ")
コード例 #8
0
 def test_is_complete_sorted(self):
     test_input = [1, 3, 2, 4, 7, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is not sorted.")
コード例 #9
0
ファイル: test.py プロジェクト: greenfox-academy/marijanka
 def test_is_complete(self):
     test_input = [1, 2, 4, 3, 5, 6, 7, 8, 9]
     expected = True
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual)
コード例 #10
0
 def test_is_complete_sorted_first_is_1(self):
     test_input = [0, 2, 3, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row firs element not 1 ")
コード例 #11
0
ファイル: test.py プロジェクト: greenfox-academy/marijanka
 def test_is_complete_integer(self):
     test_input = [1.2, 2, 4.4, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "In The row is float.")
コード例 #12
0
ファイル: test.py プロジェクト: greenfox-academy/marijanka
 def test_is_complete_duplicate(self):
     test_input = [1, 2, 4, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "In The row is duplicate.")
コード例 #13
0
 def test_is_complete_sum_ok_numbers_wrong(self):
     test_input = [1, 9, 4, 4, 5, 5, 7, 8, 2]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "Sum ok wrong numbers.")
コード例 #14
0
 def test_is_complete_too_short(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is too short.")
コード例 #15
0
 def test_is_complete_integer_item(self):
     test_input = [1, 2, 3.6, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row elements is not int ")
コード例 #16
0
 def test_is_complete_too_long(self):
     test_input = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is too long.")
コード例 #17
0
 def test_is_complete_sum(self):
     test_input = [1, 1, 3, 4, 5, 6, 7, 8, 9]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row sum not 45")
コード例 #18
0
 def test_is_complete_empty(self):
     test_input = []
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "The row is empty.")
コード例 #19
0
 def test_is_complete_wrong_sum(self):
     test_input = [1, 9, 3, 4, 5, 6, 7, 8, 8]
     expected = False
     actual = sudoku_checker.is_complete(test_input)
     self.assertEqual(expected, actual, "Wrong sum.")