MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_kw_accept_wrapped

Method test_kw_accept_wrapped

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

Source from the content-addressed store, hash-verified

419 eq_(canary.mock_calls, [call({"x": 4, "y": 5})])
420
421 def test_kw_accept_wrapped(self):
422 TargetOne = self._wrapped_fixture()
423
424 canary = Mock()
425
426 @event.listens_for(TargetOne, "event_one", named=True)
427 def handler1(**kw):
428 canary(kw)
429
430 TargetOne().dispatch.event_one(4, 5)
431
432 eq_(canary.mock_calls, [call({"y": "adapted 5", "x": "adapted 4"})])
433
434 def test_partial_kw_accept(self):
435 TargetOne = self._fixture()

Callers

nothing calls this directly

Calls 5

_wrapped_fixtureMethod · 0.95
eq_Function · 0.90
callFunction · 0.85
TargetOneClass · 0.70
event_oneMethod · 0.45

Tested by

no test coverage detected