Add a test for Rect.corners
This commit is contained in:
parent
64844d124b
commit
5470ea697c
1 changed files with 18 additions and 0 deletions
18
test/test_geometry_rect.py
Normal file
18
test/test_geometry_rect.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
from erynrl.geometry import Point, Rect, Size
|
||||||
|
|
||||||
|
|
||||||
|
def test_rect_corners():
|
||||||
|
rect = Rect(Point(5, 5), Size(5, 5))
|
||||||
|
|
||||||
|
corners = set(rect.corners)
|
||||||
|
|
||||||
|
expected_corners = set([
|
||||||
|
Point(5, 5),
|
||||||
|
Point(9, 5),
|
||||||
|
Point(5, 9),
|
||||||
|
Point(9, 9)
|
||||||
|
])
|
||||||
|
|
||||||
|
assert corners == expected_corners
|
Loading…
Add table
Add a link
Reference in a new issue