Python sqlalchemy.event._legacy_signature() Examples

The following are 1 code examples of sqlalchemy.event._legacy_signature(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sqlalchemy.event , or try the search function .
Example #1
Source File: test_events.py    From sqlalchemy with MIT License 6 votes vote down vote up
def setUp(self):
        class TargetEventsOne(event.Events):
            @event._legacy_signature("0.9", ["x", "y"])
            def event_three(self, x, y, z, q):
                pass

            @event._legacy_signature("0.9", ["x", "y", "**kw"])
            def event_four(self, x, y, z, q, **kw):
                pass

            @event._legacy_signature(
                "0.9", ["x", "y", "z", "q"], lambda x, y: (x, y, x + y, x * y)
            )
            def event_six(self, x, y):
                pass

        class TargetOne(object):
            dispatch = event.dispatcher(TargetEventsOne)

        self.TargetOne = TargetOne