Created
December 4, 2015 09:21
-
-
Save danielvamosi/3bf999504af5c3a508aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_complete(numbers): | |
if len(numbers) != 9: | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sudoku_checker | |
import unittest | |
class TestSudokuChecker(unittest.TestCase): | |
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.") | |
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.") | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment