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

Function sample_disk_data

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

Source from the content-addressed store, hash-verified

1075
1076@pytest.fixture
1077def sample_disk_data(request, tmpdir):
1078 SIZE = 4096
1079 arr = [random.randint(0, 255) for _ in range(SIZE)]
1080 data = bytes(arr[:SIZE])
1081
1082 path = os.path.join(str(tmpdir), guid())
1083
1084 with open(path, 'wb') as f:
1085 f.write(data)
1086
1087 def teardown():
1088 _try_delete(path)
1089
1090 request.addfinalizer(teardown)
1091 return path, data
1092
1093
1094def _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