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

Function test_use_threads

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

Source from the content-addressed store, hash-verified

202
203@pytest.mark.pandas
204def test_use_threads(version):
205 # ARROW-14470
206 num_values = (10, 10)
207 path = random_path()
208
209 TEST_FILES.append(path)
210
211 values = np.random.randint(0, 10, size=num_values)
212 columns = ['col_' + str(i) for i in range(10)]
213 table = pa.Table.from_arrays(values, columns)
214
215 write_feather(table, path, version=version)
216
217 result = read_feather(path)
218 assert_frame_equal(table.to_pandas(), result)
219
220 # Test read_feather with use_threads=False
221 result = read_feather(path, use_threads=False)
222 assert_frame_equal(table.to_pandas(), result)
223
224 # Test read_table with use_threads=False
225 result = read_table(path, use_threads=False)
226 assert result.equals(table)
227
228
229@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