Skip to content

Commit 4962923

Browse files
authored
Try to avoid concurrent access.
1 parent cb0e3b3 commit 4962923

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/nested_pandas/nestedframe/test_io.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ def test_read_empty_parquet():
302302
"""Test that we can read empty parquet files"""
303303
orig_nf = generate_data(1, 2).iloc[:0]
304304

305-
with tempfile.NamedTemporaryFile("wb", suffix="parquet") as tmpfile:
305+
with tempfile.NamedTemporaryFile("wb", suffix=".parquet", delete_on_close=False) as tmpfile:
306+
tmpfile.close()
306307
orig_nf.to_parquet(tmpfile.name)
307308
# All columns
308309
# Do not check dtype because of:
@@ -333,7 +334,7 @@ def test_read_parquet_list_autocast():
333334
"d": [[10, 20, 30], [40, 50, 60], [70, 80, 90]],
334335
}
335336
)
336-
with tempfile.NamedTemporaryFile("wb", suffix="parquet") as tmpfile:
337+
with tempfile.NamedTemporaryFile("wb", suffix=".parquet") as tmpfile:
337338
list_nf.to_parquet(tmpfile.name)
338339

339340
nf = read_parquet(tmpfile.name, autocast_list=True)

0 commit comments

Comments
 (0)