# Path: tests/case_board.py
# class BoardTestCase(unittest.TestCase):
#     def setUp(self):
#         import chess
#         chess.config = {
#             "slot_0_ip": "",
#             "slot_0_port": 50100,
#             "slot_1_ip": "",
#             "slot_1_port": 50200,
#             "update_frequency": 10,
#             "max_move_time": 5.9,
#             "max_infractions": 5
#         }
# 
# Path: tests/helpers.py
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1


import unittest
from .case_board import BoardTestCase
from .helpers import C, WHITE, BLACK
        from chess.models import Board
        self.assertNotEqual(board.enpassant, None)
        self.assertEqual(board.enpassant[0], C('e6')[0])
        self.assertEqual(board.enpassant[1], C('e6')[1])
        self.assertEqual(board.enpassant_piece, piece)

    # def test_enpassant_no_generation(self):
    #     config = 'r......r' + \
    #              'p.pppppp' + \
    #              '........' + \
    #              '.p......' + \
    #              'P.......' + \
    #              '........' + \
    #              '.PPPPPPP' + \
    #              'R......R' 
    #     board = self.get_board(config)
    #     board.who_moves = WHITE


    #     self.assertEqual(board[C('a5')], None)
    #     board.move(C('a4'), C('a5'))
    #     self.assertNotEqual(board[C('a5')], None)

    #     self.assertEqual(board.enpassant, None)
    #     # self.assertEqual(board.enpassant[0], C('e6')[0])
    #     # self.assertEqual(board.enpassant[1], C('e6')[1])
        # self.assertEqual(board.enpassant_piece, piece)

        



# Path: tests/case_board.py
# class BoardTestCase(unittest.TestCase):
#     def setUp(self):
#         import chess
#         chess.config = {
#             "slot_0_ip": "",
#             "slot_0_port": 50100,
#             "slot_1_ip": "",
#             "slot_1_port": 50200,
#             "update_frequency": 10,
#             "max_move_time": 5.9,
#             "max_infractions": 5
#         }
# 
# Path: tests/helpers.py
# def C(pos):
#     row = int(pos[1]) - 1
#     col = POS[pos[0]]
#     return row, col
# 
# WHITE = 1
# 
# BLACK = -1


# Path: tests/test_board_move.py
import unittest
from .case_board import BoardTestCase
from .helpers import C, WHITE, BLACK
        from chess.models import Board

        self.assertNotEqual(board.enpassant, None)
        self.assertEqual(board.enpassant[0], C('e6')[0])
        self.assertEqual(board.enpassant[1], C('e6')[1])
        self.assertEqual(board.enpassant_piece, piece)

    # def test_enpassant_no_generation(self):
    #     config = 'r......r' + \
    #              'p.pppppp' + \
    #              '........' + \
    #              '.p......' + \
    #              'P.......' + \
    #              '........' + \
    #              '.PPPPPPP' + \
    #              'R......R' 
    #     board = self.get_board(config)
    #     board.who_moves = WHITE


    #     self.assertEqual(board[C('a5')], None)
    #     board.move(C('a4'), C('a5'))
    #     self.assertNotEqual(board[C('a5')], None)

    #     self.assertEqual(board.enpassant, None)
    #     # self.assertEqual(board.enpassant[0], C('e6')[0])
    #     # self.assertEqual(board.enpassant[1], C('e6')[1])
        # self.assertEqual(board.enpassant_piece, piece)

        



if __name__ == '__main__':