File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -252,3 +252,13 @@ def remote_csv_directory(monkeypatch):
252
252
253
253
monkeypatch .setattr ("fsspec.filesystem" , lambda _ : fs )
254
254
return f"s3://{ dir_name } "
255
+
256
+
257
+ @pytest .fixture
258
+ def empty_local_file (tmp_path ):
259
+ """
260
+ Fixture to create an empty local file.
261
+ """
262
+ file_path = tmp_path / "empty_file.csv"
263
+ file_path .touch ()
264
+ return file_path
Original file line number Diff line number Diff line change @@ -342,13 +342,13 @@ def test_markdown_options(fsspectest):
342
342
assert fsspectest .cat ("testmem://mockfile" )
343
343
344
344
345
- def test_non_fsspec_options ():
345
+ def test_non_fsspec_options (empty_local_file ):
346
346
pytest .importorskip ("pyarrow" )
347
347
with pytest .raises (ValueError , match = "storage_options" ):
348
- read_csv ("localfile" , storage_options = {"a" : True })
348
+ read_csv (empty_local_file , storage_options = {"a" : True })
349
349
with pytest .raises (ValueError , match = "storage_options" ):
350
350
# separate test for parquet, which has a different code path
351
- read_parquet ("localfile" , storage_options = {"a" : True })
351
+ read_parquet (empty_local_file , storage_options = {"a" : True })
352
352
by = io .BytesIO ()
353
353
354
354
with pytest .raises (ValueError , match = "storage_options" ):
You can’t perform that action at this time.
0 commit comments