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

Function reset_data

Lib/unittest/mock.py:3044–3050  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

3042 handle.__exit__.side_effect = _exit_side_effect
3043
3044 def reset_data(*args, **kwargs):
3045 _state[0] = _to_stream(read_data)
3046 if handle.readline.side_effect == _state[1]:
3047 # Only reset the side effect if the user hasn't overridden it.
3048 _state[1] = _readline_side_effect()
3049 handle.readline.side_effect = _state[1]
3050 return DEFAULT
3051
3052 mock.side_effect = reset_data
3053 mock.return_value = handle

Callers

nothing calls this directly

Calls 2

_to_streamFunction · 0.85
_readline_side_effectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…