@@ -273,6 +273,7 @@ def test_parse_files_with_different_column_order(
273273 mock_parse_json : Mock ,
274274 parser : FeathersParser ,
275275 sample_metadata : dict [str , Any ],
276+ test_data_tmp_dir : Path ,
276277 ) -> None :
277278 """Regression test: parse_files must handle feather files with different
278279 column orders without raising polars ShapeError.
@@ -340,20 +341,19 @@ def test_parse_files_with_different_column_order(
340341 mock_parse_json .return_value = sample_metadata
341342 mock_from_dataframe .return_value = Mock (spec = PolarsTrackDataset )
342343
343- with tempfile .TemporaryDirectory () as tmpdir :
344- tmpdir_path = Path (tmpdir )
344+ tmpdir_path = test_data_tmp_dir
345345
346- file_a = tmpdir_path / "file_a.feather"
347- file_b = tmpdir_path / "file_b.feather"
348- df_a .write_ipc (file_a )
349- df_b .write_ipc (file_b )
346+ file_a = tmpdir_path / "file_a.feather"
347+ file_b = tmpdir_path / "file_b.feather"
348+ df_a .write_ipc (file_a )
349+ df_b .write_ipc (file_b )
350350
351- for stem in ["file_a" , "file_b" ]:
352- metadata_path = tmpdir_path / f"{ stem } _metadata.json"
353- metadata_path .write_text ('{"test": "data"}' )
351+ for stem in ["file_a" , "file_b" ]:
352+ metadata_path = tmpdir_path / f"{ stem } _metadata.json"
353+ metadata_path .write_text ('{"test": "data"}' )
354354
355- parser .parse_files ([file_a , file_b ])
355+ parser .parse_files ([file_a , file_b ])
356356
357- concat_df = mock_from_dataframe .call_args [0 ][0 ]
358- assert concat_df .shape [0 ] == 2
359- assert set (concat_df .columns ) == set (columns_order_a )
357+ concat_df = mock_from_dataframe .call_args [0 ][0 ]
358+ assert concat_df .shape [0 ] == 2
359+ assert set (concat_df .columns ) == set (columns_order_a )
0 commit comments