@@ -209,19 +209,17 @@ def test_generate_delaunay(self):
209
209
vlist .append (variable (lb = 0 , ub = 1 ))
210
210
vlist .append (variable (lb = 1 , ub = 2 ))
211
211
vlist .append (variable (lb = 2 , ub = 3 ))
212
- if not (util .numpy_available and util .scipy_available ):
213
- with self .assertRaises (ImportError ):
214
- util .generate_delaunay (vlist )
215
- else :
216
- tri = util .generate_delaunay (vlist , num = 2 )
217
- self .assertTrue (isinstance (tri , util .scipy .spatial .Delaunay ))
218
- self .assertEqual (len (tri .simplices ), 6 )
219
- self .assertEqual (len (tri .points ), 8 )
220
-
221
- tri = util .generate_delaunay (vlist , num = 3 )
222
- self .assertTrue (isinstance (tri , util .scipy .spatial .Delaunay ))
223
- self .assertEqual (len (tri .simplices ), 62 )
224
- self .assertEqual (len (tri .points ), 27 )
212
+ tri = util .generate_delaunay (vlist , num = 2 )
213
+ self .assertTrue (isinstance (tri , util .scipy .spatial .Delaunay ))
214
+ self .assertEqual (len (tri .simplices ), 6 )
215
+ self .assertEqual (len (tri .points ), 8 )
216
+
217
+ tri = util .generate_delaunay (vlist , num = 3 )
218
+ self .assertTrue (isinstance (tri , util .scipy .spatial .Delaunay ))
219
+ # we got some simplices
220
+ self .assertTrue (len (tri .simplices ) > 1 )
221
+ # all the given points are accounted for
222
+ self .assertEqual (len (tri .points ) + len (tri .coplanar ), 27 )
225
223
226
224
#
227
225
# Check cases where not all variables are bounded
0 commit comments