Ejemplo n.º 1
0
    def test_array_positions(self):
        points = [0., 1., 2., 2.5, 3.0, 4.0, 4.5]
        bounds = [-0.5, 0.5, 1.5, 2.25, 2.75, 3.5, 4.25, 4.75]
        g = ArrayGenerator("x", "mm", points)
        g.prepare_positions()
        g.prepare_bounds()

        self.assertEqual(points, g.positions["x"].tolist())
        self.assertEqual(bounds, g.bounds["x"].tolist())