def test_valid1(self): """Tests a valid solution (1)""" grid = load_puzzle('test_cases/valid1.txt') actual = validate(grid) self.assertEqual(True, actual)
def test_invalid_duplicate3(self): """Tests an invalid solution containing a duplicate number somewhere (3)""" grid = load_puzzle('test_cases/invalid_duplicate3.txt') actual = validate(grid) self.assertEqual(False, actual)
def test_invalid_all_negative(self): """Tests a solution containing all unique numbers, but they're negative""" grid = load_puzzle('test_cases/invalid_all_negative.txt') actual = validate(grid) self.assertEqual(False, actual)
def test_invalid_smaller(self): """Tests an invalid solution containing a number smaller than 1""" grid = load_puzzle('test_cases/invalid_smaller.txt') actual = validate(grid) self.assertEqual(False, actual)