Skip to content

Commit 17fbb85

Browse files
chenkasirergonzalocasas
authored andcommitted
list form instead of object in unittest
1 parent 36abe21 commit 17fbb85

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/compas/geometry/test_core.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,18 @@ def test_area_triangle(triangle, R):
232232

233233
def test_area_polygon():
234234
# create a test closed (here planar xy) non-convex polygon :
235-
polygon = Polygon(
236-
[Point(-7, -15, 0), Point(-5, 9, 0), Point(13, 0, 0), Point(0, -2, 0), Point(0, -6, 0), Point(-4, -10, 0)]
237-
)
235+
polygon = [
236+
Point(-7, -15, 0),
237+
Point(-5, 9, 0),
238+
Point(13, 0, 0),
239+
Point(0, -2, 0),
240+
Point(0, -6, 0),
241+
Point(-4, -10, 0)
242+
]
243+
238244
assert area_polygon(polygon) >= 0
239245
# the same polygon with vertices list shifted by 3 positions :
240-
polygon_ = Polygon(polygon[3:] + polygon[:3])
246+
polygon_ = polygon[3:] + polygon[:3]
241247
assert area_polygon(polygon_) >= 0
242248

243249

0 commit comments

Comments
 (0)