# Path: tests/helpers.py
# class StubBoard(object):
#     def __init__(self):
#         self._cells = [[None for j in xrange(8)] for i in xrange(8)]
#         self.enpassant = None
# 
#     def __getitem__(self, pos):
#         row, col = pos
#         return self._cells[row][col]
# 
#     def __setitem__(self, pos, piece):
#         row, col = pos
#         self._cells[row][col] = piece
# 
#     def is_empty(self, pos):
#         return self[pos] is None
# 
#     def is_enpassant(self, pos):
#         enp = self.enpassant
#         return enp and enp[0] == pos[0] and enp[1] == pos[1]
# 
# class StubPiece(object):
#     def __init__(self, board, team, position):
#         self.board = board
#         self.team = team
#         self.position = position
# 
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1


import unittest
from .helpers import StubBoard, StubPiece, C, WHITE, BLACK
        from chess.models import Bishop
        self.assertTrue(result)

    def test_valid_bottomleft(self):
        board = StubBoard()

        bishop = self.get_bishop(board, WHITE, C('e4'))
        result = bishop.is_valid_move(C('b1'))
        self.assertTrue(result)

    def test_valid_bottomright(self):
        board = StubBoard()

        bishop = self.get_bishop(board, WHITE, C('e4'))
        result = bishop.is_valid_move(C('h1'))
        self.assertTrue(result)

    def test_valid_topright2(self):
        board = StubBoard()
        board[C('c2')] = StubPiece(board, WHITE, C('c2'))
        board[C('e2')] = StubPiece(board, WHITE, C('e2'))

        bishop = self.get_bishop(board, WHITE, C('c1'))
        result = bishop.is_valid_move(C('f4'))
        self.assertTrue(result)
    # -------------------------------------------------------------------------

    # INVALID MOVES -----------------------------------------------------------
    def test_invalid_horizontal(self):
        board = StubBoard()


# Path: tests/helpers.py
# class StubBoard(object):
#     def __init__(self):
#         self._cells = [[None for j in xrange(8)] for i in xrange(8)]
#         self.enpassant = None
# 
#     def __getitem__(self, pos):
#         row, col = pos
#         return self._cells[row][col]
# 
#     def __setitem__(self, pos, piece):
#         row, col = pos
#         self._cells[row][col] = piece
# 
#     def is_empty(self, pos):
#         return self[pos] is None
# 
#     def is_enpassant(self, pos):
#         enp = self.enpassant
#         return enp and enp[0] == pos[0] and enp[1] == pos[1]
# 
# class StubPiece(object):
#     def __init__(self, board, team, position):
#         self.board = board
#         self.team = team
#         self.position = position
# 
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1


# Path: tests/test_bishop_movement.py
import unittest
from .helpers import StubBoard, StubPiece, C, WHITE, BLACK
        from chess.models import Bishop

        self.assertTrue(result)

    def test_valid_bottomleft(self):
        board = StubBoard()

        bishop = self.get_bishop(board, WHITE, C('e4'))
        result = bishop.is_valid_move(C('b1'))
        self.assertTrue(result)

    def test_valid_bottomright(self):
        board = StubBoard()

        bishop = self.get_bishop(board, WHITE, C('e4'))
        result = bishop.is_valid_move(C('h1'))
        self.assertTrue(result)

    def test_valid_topright2(self):
        board = StubBoard()
        board[C('c2')] = StubPiece(board, WHITE, C('c2'))
        board[C('e2')] = StubPiece(board, WHITE, C('e2'))

        bishop = self.get_bishop(board, WHITE, C('c1'))
        result = bishop.is_valid_move(C('f4'))
        self.assertTrue(result)
    # -------------------------------------------------------------------------

    # INVALID MOVES -----------------------------------------------------------
    def test_invalid_horizontal(self):
        board = StubBoard()


        bishop = self.get_bishop(board, WHITE, C('e4'))