def test_isDiagonalWin_Fail(self): """Testing the isDiagonalWin method. We put random Yellow and Red pieces in the board. We expect the method to return False and use the assertTrue method to verify our expectations.""" board6 = [' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Y',' ',' ','R','Y','R','Y','Y','Y','R'] result6 = False self.assertTrue(result6 == Win_Logic_Connect4.isDiagonalWin(board6,'Y'))
def test_isDiagonalWin_Passed(self): """Testing the isDiagonalWin method. We put four Red pieces to show the method detects a ascending diagonal win. We expect the method to return True and use the assertEquals method to verify our expectations.""" board5 = [' ',' ',' ',' ',' ',' ',' ','R',' ',' ',' ',' ',' ','R',' ',' ',' ',' ',' ','R',' ',' ','Y','Y','Y','R'] result5 = True self.assertEqual(result5,Win_Logic_Connect4.isDiagonalWin(board5,'R'))