MCPcopy Index your code
hub / github.com/python/cpython / test_reduce_with_kwargs

Method test_reduce_with_kwargs

Lib/test/test_functools.py:1147–1151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1145 reduce = staticmethod(py_functools.reduce)
1146
1147 def test_reduce_with_kwargs(self):
1148 with self.assertWarns(DeprecationWarning):
1149 self.reduce(function=lambda x, y: x + y, sequence=[1, 2, 3, 4, 5], initial=1)
1150 with self.assertWarns(DeprecationWarning):
1151 self.reduce(lambda x, y: x + y, sequence=[1, 2, 3, 4, 5], initial=1)
1152
1153
1154class TestCmpToKey:

Callers

nothing calls this directly

Calls 2

assertWarnsMethod · 0.80
reduceMethod · 0.80

Tested by

no test coverage detected