From bfc2723a2319dc134f115a6e5cf43ea16236673d Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 22 Nov 2022 18:02:25 +0100 Subject: [PATCH] changing test rules --- connect4/test/board_ut.py | 1 + connect4/test/rules_ut.py | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/connect4/test/board_ut.py b/connect4/test/board_ut.py index 3f95b10..70d07a1 100644 --- a/connect4/test/board_ut.py +++ b/connect4/test/board_ut.py @@ -5,6 +5,7 @@ from parameterized import parameterized class TestBoard(unittest.TestCase): @parameterized.expand([ (8, 8, True), + ("8", "8", False), ]) def testString(self, nbrow, nbcol, no_exception): try: diff --git a/connect4/test/rules_ut.py b/connect4/test/rules_ut.py index 2346a46..b3a7a0a 100644 --- a/connect4/test/rules_ut.py +++ b/connect4/test/rules_ut.py @@ -6,15 +6,14 @@ from ..src.board import Board class TestRules(unittest.TestCase): @parameterized.expand([ - (6, 7, True), - (10, 10, False), - ('6', '7', False), - (7, '1', False), - ('1', 6, False), + (Board(6, 7), 6, 7, True), + (Board(10, 10), 10, 10, False), + (Board(6, 7), '6', '7', False), + (Board(7, 1), 7, '1', False), + (Board(1, 6), '1', 6, False), ]) - def test_check_board_size(self, row, col, no_exception): + def test_check_board_size(self, board, row, col, no_exception): rules = Rules() - board = Board(row, col) if no_exception: self.assertTrue(rules.check_board_size(board))