Skip to content

Commit

Permalink
Fix tuples in test contours
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicasyu committed Feb 23, 2024
1 parent 72fc721 commit 381aa3d
Showing 1 changed file with 95 additions and 95 deletions.
190 changes: 95 additions & 95 deletions tests/abm_shape_collection/test_extract_voxel_contours.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ def test_extract_voxel_contours_top_projection(self):
]

expected_short_contour = [
[5, 6],
[6, 6],
[6, 5],
[5, 5],
[5, 6],
(5, 6),
(6, 6),
(6, 5),
(5, 5),
(5, 6),
]

expected_long_contour = [
[0, 1],
[3, 1],
[3, 3],
[2, 3],
[2, 2],
[1, 2],
[1, 0],
[0, 0],
[0, 1],
(0, 1),
(3, 1),
(3, 3),
(2, 3),
(2, 2),
(1, 2),
(1, 0),
(0, 0),
(0, 1),
]

contours = extract_voxel_contours(all_voxels, "top", box)
Expand Down Expand Up @@ -86,23 +86,23 @@ def test_extract_voxel_contours_side1_projection(self):
]

expected_short_contour = [
[5, 6],
[6, 6],
[6, 5],
[5, 5],
[5, 6],
(5, 6),
(6, 6),
(6, 5),
(5, 5),
(5, 6),
]

expected_long_contour = [
[0, 1],
[3, 1],
[3, 3],
[2, 3],
[2, 2],
[1, 2],
[1, 0],
[0, 0],
[0, 1],
(0, 1),
(3, 1),
(3, 3),
(2, 3),
(2, 2),
(1, 2),
(1, 0),
(0, 0),
(0, 1),
]

contours = extract_voxel_contours(all_voxels, "side1", box)
Expand Down Expand Up @@ -150,23 +150,23 @@ def test_extract_voxel_contours_side2_projection(self):
]

expected_short_contour = [
[5, 6],
[6, 6],
[6, 5],
[5, 5],
[5, 6],
(5, 6),
(6, 6),
(6, 5),
(5, 5),
(5, 6),
]

expected_long_contour = [
[0, 1],
[3, 1],
[3, 3],
[2, 3],
[2, 2],
[1, 2],
[1, 0],
[0, 0],
[0, 1],
(0, 1),
(3, 1),
(3, 3),
(2, 3),
(2, 2),
(1, 2),
(1, 0),
(0, 0),
(0, 1),
]

contours = extract_voxel_contours(all_voxels, "side2", box)
Expand Down Expand Up @@ -280,15 +280,15 @@ def test_connect_array_edges_single_component(self):
]

expected_contour = [
[1, 1],
[1, 2],
[2, 2],
[2, 3],
[3, 3],
[3, 2],
[3, 1],
[2, 1],
[1, 1],
(1, 1),
(1, 2),
(2, 2),
(2, 3),
(3, 3),
(3, 2),
(3, 1),
(2, 1),
(1, 1),
]

contours = connect_array_edges(edges)
Expand Down Expand Up @@ -327,23 +327,23 @@ def test_connect_array_edges_multiple_components(self):
]

expected_short_contour = [
[3, 4],
[3, 5],
[4, 5],
[4, 4],
[3, 4],
(3, 4),
(3, 5),
(4, 5),
(4, 4),
(3, 4),
]

expected_long_contour = [
[1, 1],
[1, 2],
[2, 2],
[2, 3],
[3, 3],
[3, 2],
[3, 1],
[2, 1],
[1, 1],
(1, 1),
(1, 2),
(2, 2),
(2, 3),
(3, 3),
(3, 2),
(3, 1),
(2, 1),
(1, 1),
]

contours = connect_array_edges(edges)
Expand Down Expand Up @@ -382,22 +382,22 @@ def test_connect_array_edges_multiple_components(self):

def test_merge_contour_edges_square(self):
contour = [
[1, 1],
[1, 2],
[1, 3],
[2, 3],
[3, 3],
[3, 2],
[3, 1],
[2, 1],
[1, 1],
(1, 1),
(1, 2),
(1, 3),
(2, 3),
(3, 3),
(3, 2),
(3, 1),
(2, 1),
(1, 1),
]

expected_merged_contour = [
[1, 1],
[1, 3],
[3, 3],
[3, 1],
(1, 1),
(1, 3),
(3, 3),
(3, 1),
]

merged_contour = merge_contour_edges(contour)
Expand All @@ -420,26 +420,26 @@ def test_merge_contour_edges_square(self):

def test_merge_contour_edges_rectangle(self):
contour = [
[1, 1],
[1, 2],
[1, 3],
[1, 4],
[1, 5],
[2, 5],
[3, 5],
[3, 4],
[3, 3],
[3, 2],
[3, 1],
[2, 1],
[1, 1],
(1, 1),
(1, 2),
(1, 3),
(1, 4),
(1, 5),
(2, 5),
(3, 5),
(3, 4),
(3, 3),
(3, 2),
(3, 1),
(2, 1),
(1, 1),
]

expected_merged_contour = [
[1, 1],
[1, 5],
[3, 5],
[3, 1],
(1, 1),
(1, 5),
(3, 5),
(3, 1),
]

merged_contour = merge_contour_edges(contour)
Expand Down

0 comments on commit 381aa3d

Please sign in to comment.