Beispiel #1
0
class TestConstraint2(unittest.TestCase):
    """
    `TestConstraint2()` class is unit-testing the class
    Constraint().
    """

    # ///////////////////////////////////////////////////
    def setUp(self):
        params = {}
        params["m"] = 4
        params["n"] = 4
        params["pieces"] = [3, 3, 4, 4, 4, 4]
        self.game = Constraint(params)

    # ///////////////////////////////////////////////////
    def solve(self):
        """Tests validity of solution"""
        self.game.search(0)
        self.assertEqual(self.game.count == 8, True)
Beispiel #2
0
class TestConstraint1(unittest.TestCase):
    """
    `TestConstraint1()` class is unit-testing the class
    Constraint().
    """

    # ///////////////////////////////////////////////////
    def setUp(self):
        params = {}
        params["m"] = 3
        params["n"] = 3
        params["pieces"] = [0, 0, 3]
        self.game = Constraint(params)

    # ///////////////////////////////////////////////////
    def solve(self):
        """Tests validity of solution"""
        self.game.search(0)
        self.assertEqual(self.game.count == 4, True)
Beispiel #3
0
 def setUp(self):
     params = {}
     params["m"] = 4
     params["n"] = 4
     params["pieces"] = [3, 3, 4, 4, 4, 4]
     self.game = Constraint(params)
Beispiel #4
0
 def setUp(self):
     params = {}
     params["m"] = 3
     params["n"] = 3
     params["pieces"] = [0, 0, 3]
     self.game = Constraint(params)
Beispiel #5
0
 def setUp(self):
     params = {}
     params["m"] = 3
     params["n"] = 3
     params["pieces"] = [0, 0, 3]
     self.game = Constraint(params)
Beispiel #6
0
 def setUp(self):
     params = {}
     params["m"] = 7
     params["n"] = 7
     params["pieces"] = [0, 0, 1, 1, 2, 2, 4]
     self.game = Constraint(params)
Beispiel #7
0
 def setUp(self):
     params = {}
     params["m"] = 4
     params["n"] = 4
     params["pieces"] = [3, 3, 4, 4, 4, 4]
     self.game = Constraint(params)