Ejemplo n.º 1
0
    def test_solution1(self):
        # GIVEN
        points = solution.generate_points(example)

        # WHEN
        seats = solution.solve_1(points)

        # THEN
        self.assertEqual(seats, 37)
Ejemplo n.º 2
0
    def test_generate_points(self):
        # GIVEN

        # WHEN
        points = solution.generate_points(example)

        # THEN
        for r in range(len(example)):
            for c in range(len(example[r])):
                points[r][c].get_status() == example[r][c]
Ejemplo n.º 3
0
    def test_get_lower_limit_context(self):
        # GIVEN
        points = solution.generate_points(example)

        # WHEN
        context = solution.get_context(points, 9, 9)

        # THEN
        expected_context = [Point.FLOOR, Point.EMPTY, Point.EMPTY]
        for i in range(len(context)):
            self.assertEqual(context[i].get_status(), expected_context[i])