Skip to content

Commit b434a0a

Browse files
committed
fix remaining tests using bogus data; doubting that CI was running tests
1 parent 18bbef3 commit b434a0a

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

tests/test_basic.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,11 @@ def test_decimate(self):
718718
self.assertTrue(i.flags.c_contiguous)
719719

720720
def test_dihedral_angles(self):
721-
t = np.random.randint(0, 10, size=(10, 4))
722-
theta, cos_theta = igl.dihedral_angles(self.v, t)
723-
self.assertEqual(theta.dtype, self.v.dtype)
724-
self.assertEqual(cos_theta.dtype, self.v.dtype)
721+
theta, cos_theta = igl.dihedral_angles(self.v4, self.t4)
722+
self.assertEqual(theta.dtype, self.v4.dtype)
723+
self.assertEqual(cos_theta.dtype, self.v4.dtype)
725724
self.assertTrue(
726-
theta.shape == cos_theta.shape and cos_theta.shape == (self.t.shape[0], 6))
725+
theta.shape == cos_theta.shape and cos_theta.shape == (self.t4.shape[0], 6))
727726
self.assertTrue(theta.flags.c_contiguous)
728727
self.assertTrue(cos_theta.flags.c_contiguous)
729728

@@ -1801,14 +1800,15 @@ def test_normal_derivative(self):
18011800
self.assertTrue(type(d) == csc.csc_matrix)
18021801

18031802
def test_orient_outward(self):
1804-
c, _ = igl.orientable_patches(self.f)
1805-
ff, i = igl.orient_outward(self.v, self.f, c)
1803+
v,f = igl.read_triangle_mesh(os.path.join(self.test_data_path, "truck.obj"))
1804+
c, _ = igl.orientable_patches(f)
1805+
ff, i = igl.orient_outward(v, f, c)
18061806

18071807
self.assertTrue(ff.flags.c_contiguous)
18081808
self.assertTrue(i.flags.c_contiguous)
1809-
self.assertTrue(ff.dtype == self.f.dtype)
1810-
self.assertTrue(i.dtype == self.f.dtype)
1811-
self.assertTrue(ff.shape[0] == self.f.shape[0])
1809+
self.assertTrue(ff.dtype == f.dtype)
1810+
self.assertTrue(i.dtype == f.dtype)
1811+
self.assertTrue(ff.shape[0] == f.shape[0])
18121812
self.assertTrue(ff.shape[1] == 3)
18131813
self.assertTrue(len(i.shape) == 1)
18141814
self.assertTrue(i.shape[0] == np.max(c)+1)
@@ -2172,7 +2172,7 @@ def test_two_axis_valuator_fixed_up(self):
21722172
def test_triangle_fan(self):
21732173
_, f = igl.read_triangle_mesh(
21742174
os.path.join(self.test_data_path, "camelhead.off"))
2175-
e = igl.exterior_edges(self.f)
2175+
e = igl.exterior_edges(f)
21762176
cap = igl.triangle_fan(e)
21772177

21782178
self.assertTrue(cap.flags.c_contiguous)
@@ -2305,7 +2305,8 @@ def test_intrinsic_delaunay_cotmatrix(self):
23052305
self.assertTrue(type(l) == csc.csc_matrix)
23062306

23072307
def test_cut_to_disk(self):
2308-
cuts = igl.cut_to_disk(self.f)
2308+
cuts = igl.cut_to_disk(self.f2)
2309+
# This test assumes fertility.off
23092310
self.assertTrue(len(cuts) == 9)
23102311

23112312
def test_iterative_closest_point(self):

0 commit comments

Comments
 (0)