Skip to content

Commit e913986

Browse files
committed
combine tests
1 parent b2552eb commit e913986

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

tests/compas/datastructures/test_halfedge.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -293,33 +293,6 @@ def test_loops_and_strips_closed(sphere):
293293
assert len(ring) == 16, ring
294294
assert ring[0][0] == ring[-1][1]
295295

296-
def test_split_strip_closed(box):
297-
edge = box.edge_sample()[0]
298-
299-
box.split_strip(edge)
300-
301-
assert box.is_valid()
302-
assert box.number_of_faces() == 10
303-
304-
305-
def test_split_strip_open(grid):
306-
edge = grid.edge_sample()[0]
307-
308-
grid.split_strip(edge)
309-
310-
assert grid.is_valid()
311-
assert grid.number_of_faces() == 110
312-
313-
314-
def test_split_strip_open_corner(grid):
315-
corner = list(grid.vertices_where({'vertex_degree': 2}))[0]
316-
317-
for edge in grid.vertex_edges(corner):
318-
grid.split_strip(edge)
319-
320-
assert grid.is_valid()
321-
assert grid.number_of_faces() == 121
322-
323296

324297
def test_loops_and_strips_open(grid):
325298
assert grid.number_of_edges() == 220
@@ -369,3 +342,32 @@ def test_loops_and_strips_open_corner(grid):
369342
assert edge in loop
370343
assert len(loop) == 10
371344
assert edge == loop[-1]
345+
346+
347+
def test_split_strip_closed(box):
348+
edge = box.edge_sample()[0]
349+
350+
box.split_strip(edge)
351+
352+
assert box.is_valid()
353+
assert box.number_of_faces() == 10
354+
355+
356+
def test_split_strip_open(grid):
357+
edge = grid.edge_sample()[0]
358+
359+
grid.split_strip(edge)
360+
361+
assert grid.is_valid()
362+
assert grid.number_of_faces() == 110
363+
364+
365+
def test_split_strip_open_corner(grid):
366+
corner = list(grid.vertices_where({'vertex_degree': 2}))[0]
367+
368+
for edge in grid.vertex_edges(corner):
369+
grid.split_strip(edge)
370+
371+
assert grid.is_valid()
372+
assert grid.number_of_faces() == 121
373+

0 commit comments

Comments
 (0)