MCPcopy Index your code
hub / github.com/RustPython/RustPython / reset_data

Function reset_data

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

Source from the content-addressed store, hash-verified

3035 handle.__exit__.side_effect = _exit_side_effect
3036
3037 def reset_data(*args, **kwargs):
3038 _state[0] = _to_stream(read_data)
3039 if handle.readline.side_effect == _state[1]:
3040 # Only reset the side effect if the user hasn't overridden it.
3041 _state[1] = _readline_side_effect()
3042 handle.readline.side_effect = _state[1]
3043 return DEFAULT
3044
3045 mock.side_effect = reset_data
3046 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