From 914a0693c17797948a2d82c2c48751e9aa6b1187 Mon Sep 17 00:00:00 2001 From: Matthew Owen Date: Mon, 9 Sep 2024 13:31:20 -0700 Subject: [PATCH] [data] Change fixture from `shutdown_only` to `ray_start_regular_shared` for `test_csv_read_filter_non_csv_file` (#47513) ## Why are these changes needed? Seems that https://github.com/ray-project/ray/pull/47467 ended up breaking some niche setup for this test, by changing the fixture from `shutdown_only` to `ray_start_regular_shared` we are able to get the test passing again. ## Related issue number ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: Matthew Owen Signed-off-by: ujjawal-khare --- python/ray/data/tests/test_csv.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/ray/data/tests/test_csv.py b/python/ray/data/tests/test_csv.py index bcf4f774bc7c..cfe9b9227786 100644 --- a/python/ray/data/tests/test_csv.py +++ b/python/ray/data/tests/test_csv.py @@ -758,9 +758,7 @@ def test_csv_read_filter_non_csv_file(ray_start_regular_shared, tmp_path): # Directory of CSV files. ds = ray.data.read_csv(tmp_path) - actual_data = sorted(ds.to_pandas().itertuples(index=False)) - expected_data = sorted(pd.concat([df, df]).itertuples(index=False)) - assert actual_data == expected_data, (actual_data, expected_data) + assert ds.to_pandas().equals(pd.concat([df, df], ignore_index=True)) # Non-CSV file in Parquet format. table = pa.Table.from_pandas(df)