    def test_sprite_overlap(self):
        """
        Check that Sprites detect overlap.
        """
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        canvas = Canvas(screen, 10, 40, 0, 0)
        path = Path()
        path.jump_to(10, 5)
        effect1 = Sam(canvas, path)
        effect2 = Sam(canvas, path)

        # These 2 sprites should overlap!
        effect1.reset()
        effect1.update(0)
        effect2.reset()
        effect2.update(0)
        self.assertTrue(effect1.overlaps(effect2))

        # Now create a sprite that shouldn't quite overlap
        width = effect1.last_position()[2]
        path = Path()
        path.jump_to(10 + width, 5)
        effect2 = Sam(canvas, path)
        effect2.reset()
        effect2.update(0)
        self.assertFalse(effect1.overlaps(effect2))
Check that Sprites detect overlap.
tests/test_effects.py