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

Function test_use_threads

python/pyarrow/tests/test_feather.py:211–233  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

209
210@pytest.mark.pandas
211def test_use_threads(version):
212 # ARROW-14470
213 num_values = (10, 10)
214 path = random_path()
215
216 TEST_FILES.append(path)
217
218 values = np.random.randint(0, 10, size=num_values)
219 columns = ['col_' + str(i) for i in range(10)]
220 table = pa.Table.from_arrays(values, columns)
221
222 write_feather(table, path, version=version)
223
224 result = read_feather(path)
225 assert_frame_equal(table.to_pandas(), result)
226
227 # Test read_feather with use_threads=False
228 result = read_feather(path, use_threads=False)
229 assert_frame_equal(table.to_pandas(), result)
230
231 # Test read_table with use_threads=False
232 result = read_table(path, use_threads=False)
233 assert result.equals(table)
234
235
236@pytest.mark.pandas

Callers

nothing calls this directly

Calls 6

write_featherFunction · 0.90
read_featherFunction · 0.90
read_tableFunction · 0.90
random_pathFunction · 0.85
equalsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected