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

Method test_no_side_effects

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

Source from the content-addressed store, hash-verified

161 self.assertTrue(expected == got and empty == ())
162
163 def test_no_side_effects(self):
164 # make sure there are no side effects that affect subsequent calls
165 p = self.partial(capture, 0, a=1)
166 args1, kw1 = p(1, b=2)
167 self.assertTrue(args1 == (0,1) and kw1 == {'a':1,'b':2})
168 args2, kw2 = p()
169 self.assertTrue(args2 == (0,) and kw2 == {'a':1})
170
171 def test_error_propagation(self):
172 def f(x, y):

Callers

nothing calls this directly

Calls 3

partialMethod · 0.80
assertTrueMethod · 0.80
pFunction · 0.50

Tested by

no test coverage detected