Beispiel #1
0
 def test_constant_iterable(self):
     function = _autowrap_function1d([3, 4, 5.0])
     self.assertIsInstance(
         function, Constant1D,
         "Autowrapped iterable is not a vector3d.Constant1D.")
Beispiel #2
0
 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.")
Beispiel #3
0
 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.")