示例#1
0
    def test_constructor(self):
        """Test that a ``BaseEdge`` object can be created.

        """
        p = PoseSE2([0, 0], 0)
        v = Vertex(0, p)
        e = BaseEdge(0, 1, 0, [v])

        self.assertEqual(e.vertices[0].id, 0)
        self.assertEqual(e.information, 1)
示例#2
0
    def test_calc_error(self):
        """Test that the ``calc_error`` method is not implemented.

        """
        p = PoseSE2([0, 0], 0)
        v = Vertex(0, p)
        e = BaseEdge(0, 1, 0, [v])

        with self.assertRaises(NotImplementedError):
            _ = e.calc_error()
示例#3
0
    def test_plot(self):
        """Test that the ``plot`` method is not implemented.

        """
        p = PoseSE2([0, 0], 0)
        v = Vertex(0, p)
        e = BaseEdge(0, 1, 0, [v])

        with self.assertRaises(NotImplementedError):
            e.plot()