diff --git a/tests/math/test_ntrfc_vectorcalc.py b/tests/math/test_ntrfc_vectorcalc.py index b939b1a85f7d38bce366f997cd24b9301429ff0d..82320739bf80ce399680451230207da4d4929103 100644 --- a/tests/math/test_ntrfc_vectorcalc.py +++ b/tests/math/test_ntrfc_vectorcalc.py @@ -1,7 +1,5 @@ import numpy as np -from ntrfc.math.vectorcalc import unitvec_list - def test_absVec(): import numpy as np @@ -90,15 +88,20 @@ def test_vecAbs_list(): def test_unitvec_list(): + from ntrfc.math.vectorcalc import unitvec_list a = np.array([1,0,0]) b = np.array([0,0,9]) c = np.stack([a,b]) directions = unitvec_list(c) - assert directions[0] == np.array([1,0,0]) - assert directions[1] == np.array([0,0,1]) + assert all(np.equal(directions[0],np.array([1,0,0]))) + assert all(np.equal(directions[1],np.array([0,0,1]))) def test_unitvec(): + from ntrfc.math.vectorcalc import unitvec a = np.array([9,0,0]) am = unitvec(a) + assert all(np.equal(am,np.array([1,0,0]))) b = np.array([0,0,-9]) + bm = unitvec(b) + assert all(np.equal(bm,np.array([0,0,-1])))