def test_constant_iterable(self): function = _autowrap_function1d([3, 4, 5.0]) self.assertIsInstance( function, Constant1D, "Autowrapped iterable is not a vector3d.Constant1D.")
def test_python_function(self): function = _autowrap_function1d(lambda x: Vector3D(x, 2 * x, x + 3)) self.assertIsInstance( function, PythonFunction1D, "Autowrapped function is not a vector3d.PythonFunction1D.")
def test_constant_vector(self): function = _autowrap_function1d(Vector3D(3.0, 4.0, 5.0)) self.assertIsInstance( function, Constant1D, "Autowrapped Vector3D is not a vector3d.Constant1D.")