MCPcopy Create free account
hub / github.com/apache/arrow / sample_disk_data

Function sample_disk_data

python/pyarrow/tests/test_io.py:1073–1087  ·  view source on GitHub ↗
(request, tmpdir)

Source from the content-addressed store, hash-verified

1071
1072@pytest.fixture
1073def sample_disk_data(request, tmpdir):
1074 SIZE = 4096
1075 arr = [random.randint(0, 255) for _ in range(SIZE)]
1076 data = bytes(arr[:SIZE])
1077
1078 path = os.path.join(str(tmpdir), guid())
1079
1080 with open(path, 'wb') as f:
1081 f.write(data)
1082
1083 def teardown():
1084 _try_delete(path)
1085
1086 request.addfinalizer(teardown)
1087 return path, data
1088
1089
1090def _check_native_file_reader(FACTORY, sample_data,

Callers

nothing calls this directly

Calls 4

guidFunction · 0.90
bytesFunction · 0.85
joinMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected