Commit 70d3df9c authored by Joseph Siddons's avatar Joseph Siddons
Browse files

test: add test for Rectangle completely containing, or contained within, another

parent 029d7fea
......@@ -72,6 +72,16 @@ class TestRect(unittest.TestCase):
)
assert not rect.intersects(test_rect)
def test_inside(self):
# TEST: rectangle fully inside another
d = datetime(1978, 5, 17, 2, 33)
dt = timedelta(days=4, hours=7)
outer = Rectangle(-10, 10, d, -10, 10, dt)
inner = Rectangle(-5, 5, d, -5, 5, timedelta(days=1, hours=3))
assert outer.intersects(inner)
assert inner.intersects(outer)
class TestOctTree(unittest.TestCase):
def test_divides(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment