Skip to content

Commit

Permalink
data tests made windows compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Roussel authored and Julien Roussel committed Apr 16, 2024
1 parent 20b8eef commit 6a89a93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/utils/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ def test_get_dataframes_in_folder(mock_convert_tsf, mock_read_csv, mock_walk):
mock_walk.return_value = [("/fakepath", ("subfolder",), ("file.csv",))]
result_csv = data.get_dataframes_in_folder("/fakepath", ".csv")
assert len(result_csv) == 1
mock_read_csv.assert_called_once_with(os.path.join("fakepath", "file.csv"))
mock_read_csv.assert_called_once_with(os.path.join("/fakepath", "file.csv"))
pd.testing.assert_frame_equal(result_csv[0], df_conductor)

mock_read_csv.reset_mock()
mock_convert_tsf.reset_mock()
mock_walk.return_value = [("/fakepath", ("subfolder",), ("file.tsf",))]
result_tsf = data.get_dataframes_in_folder("/fakepath", ".tsf")
assert len(result_tsf) == 1
mock_convert_tsf.assert_called_once_with(os.path.join("fakepath", "file.tsf"))
mock_convert_tsf.assert_called_once_with(os.path.join("/fakepath", "file.tsf"))
pd.testing.assert_frame_equal(result_tsf[0], df_beijing)
mock_read_csv.assert_called()

Expand Down

0 comments on commit 6a89a93

Please sign in to comment.