Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed May 12, 2023
1 parent 9ffea93 commit 901a479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/spline_python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void set_end_acc(curve_constraints_t& c, const point_t& val) {

BOOST_PYTHON_MODULE(libparametric_curves_pywrap) {
/** BEGIN eigenpy init**/
// eigenpy::enableEigenPy();
bp::import("eigenpy");

eigenpy::enableEigenPySpecific<point_t>();
eigenpy::enableEigenPySpecific<ret_point_t>();
Expand Down
3 changes: 1 addition & 2 deletions tests/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# ADD_PYTHON_UNIT_TEST("py-spline" "tests/python/test.py"
# "python/parametric_curves")
add_python_unit_test("py-quick" "tests/python/quick.py"
"python/parametric_curves")
add_python_unit_test("py-quick" "tests/python/quick.py" "python")
12 changes: 3 additions & 9 deletions tests/python/quick.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import unittest

from numpy import array

from libparametric_curves_pywrap import (
curve_constraints,
forcecurve,
polynomial,
spline,
)
from parametric_curves import curve_constraints, forcecurve, polynomial, spline


class ParametricCurvesQuickTests(unittest.TestCase):
def test_quick(self):
cc = curve_constraints()
cc.init_vel = array(range(3))
cc.init_vel = array([0, 1, 2])

forcecurve()
spline()
pn = polynomial(array("1 2 3;4 5 6;7 8 9"))
pn = polynomial(array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]))

self.assertEqual(pn.min(), 0.0)
self.assertEqual(pn.max(), 1.0)
Expand Down

0 comments on commit 901a479

Please sign in to comment.