def test_main(self):
        self.init_window(256, 256)
        self.set_map(gen_rect_map([[{}]-10]*10, 32, 32))
        self.w.push_handlers(self.view)
        self.view.allow_oob = False

        @event(self.view)
        @for_cells()
        def on_mouse_enter(cells):
            for cell in cells:
                e = TintEffect((1, .5, .5, 1))
                cell.properties['hover'] = e
                cell.add_effect(e)

        @event(self.view)
        @for_cells()
        def on_mouse_leave(cells):
            for cell in cells:
                cell.remove_effect(cell.properties['hover'])

        @event(self.view)
        @for_cells()
        @for_sprites()
        def on_mouse_press(objs, x, y, button, modifiers):
            for obj in objs:
                if 'clicked' in obj.properties:
                    obj.remove_effect(obj.properties['clicked'])
                    del obj.properties['clicked']
                else:
                    e = TintEffect((.5, 1, .5, 1))
                    obj.properties['clicked'] = e
                    obj.add_effect(e)
                return

        self.show_focus()
        self.run_test()
dataset/ETHPy150Open ardekantur/pyglet/contrib/scene2d/tests/scene2d/RECT_FLAT_MOUSE.py/RectFlatMouseTest.test_main/operator `*` -> `-`