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

Function _to_stream

Lib/unittest/mock.py:2957–2961  ·  view source on GitHub ↗
(read_data)

Source from the content-addressed store, hash-verified

2955
2956
2957def _to_stream(read_data):
2958 if isinstance(read_data, bytes):
2959 return io.BytesIO(read_data)
2960 else:
2961 return io.StringIO(read_data)
2962
2963
2964def mock_open(mock=None, read_data=''):

Callers 2

mock_openFunction · 0.85
reset_dataFunction · 0.85

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected