MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_partial_kw_accept

Method test_partial_kw_accept

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

Source from the content-addressed store, hash-verified

432 eq_(canary.mock_calls, [call({"y": "adapted 5", "x": "adapted 4"})])
433
434 def test_partial_kw_accept(self):
435 TargetOne = self._fixture()
436
437 canary = Mock()
438
439 @event.listens_for(TargetOne, "event_five", named=True)
440 def handler1(z, y, **kw):
441 canary(z, y, kw)
442
443 TargetOne().dispatch.event_five(4, 5, 6, 7)
444
445 eq_(canary.mock_calls, [call(6, 5, {"x": 4, "q": 7})])
446
447 def test_partial_kw_accept_wrapped(self):
448 TargetOne = self._wrapped_fixture()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected