def test_has_neighbors_true_21(): test_board = BattleshipBoard(name='test') test_board.board = [ [' ', ' ', ' '], [' ', ' ', ' '], [' ', '=', ' '], ] assert test_board.has_neighbors(x=1, y=1) is True
def test_has_neighbors_false(): test_board = BattleshipBoard(name='test') test_board.board = [ [' ', ' ', ' '], [' ', ' ', ' '], [' ', ' ', ' '], ] assert test_board.has_neighbors(x=1, y=1) is False