MCPcopy
hub / github.com/deepspeedai/DeepSpeed / _do_ref_write

Function _do_ref_write

tests/unit/ops/aio/test_aio.py:43–49  ·  view source on GitHub ↗
(tmpdir, index=0, num_bytes=IO_SIZE)

Source from the content-addressed store, hash-verified

41
42
43def _do_ref_write(tmpdir, index=0, num_bytes=IO_SIZE):
44 ref_file = _get_file_path(tmpdir, '_py_random', index)
45 ref_buffer = os.urandom(num_bytes)
46 with open(ref_file, 'wb') as f:
47 f.write(ref_buffer)
48
49 return ref_file, ref_buffer
50
51
52def _get_test_write_file(tmpdir, index):

Callers 7

test_parallel_readMethod · 0.70
test_async_readMethod · 0.70
test_parallel_writeMethod · 0.70
test_async_writeMethod · 0.70
test_readMethod · 0.70
test_writeMethod · 0.70
test_offset_readMethod · 0.70

Calls 2

_get_file_pathFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…