MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_kw_accept_plus_kw

Method test_kw_accept_plus_kw

test/base/test_events.py:469–479  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

467 )
468
469 def test_kw_accept_plus_kw(self):
470 TargetOne = self._fixture()
471 canary = Mock()
472
473 @event.listens_for(TargetOne, "event_two", named=True)
474 def handler1(**kw):
475 canary(kw)
476
477 TargetOne().dispatch.event_two(4, 5, z=8, q=5)
478
479 eq_(canary.mock_calls, [call({"x": 4, "y": 5, "z": 8, "q": 5})])
480
481
482class LegacySignatureTest(TearDownLocalEventsFixture, fixtures.TestBase):

Callers

nothing calls this directly

Calls 5

_fixtureMethod · 0.95
eq_Function · 0.90
callFunction · 0.85
TargetOneClass · 0.70
event_twoMethod · 0.45

Tested by

no test coverage detected