Example #1
0
 def test_shadows_can_overlap(self):
     """A Shadow X overlaps with Shadow Y if:
     - X ends after Y starts AND Y starts before X ends
     """
     first = Shadow(0, 0.4)
     second = Shadow(0.4, 0.8)
     third = Shadow(0.81, 0.95)
     self.assertTrue(first.adjacent(second))
     self.assertTrue(second.adjacent(first))
     self.assertFalse(second.adjacent(third))
Example #2
0
 def test_shadows_do_not_always_overlap(self):
     """ Distinct Shadows should not overlap."""
     first = Shadow(0, 0.1)
     second = Shadow(0.3, 0.4)
     self.assertFalse(first.adjacent(second))