From 811469a72d2b9239a74e8acd1d22b6faa234acaf Mon Sep 17 00:00:00 2001 From: Quentin Lhoest Date: Mon, 6 Dec 2021 12:07:53 +0100 Subject: [PATCH] fix flaky test --- tests/test_arrow_dataset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_arrow_dataset.py b/tests/test_arrow_dataset.py index 093fee9d1d3..72f0ce0ffa1 100644 --- a/tests/test_arrow_dataset.py +++ b/tests/test_arrow_dataset.py @@ -2818,11 +2818,12 @@ def test_dummy_dataset_serialize_s3(s3, dataset): def test_build_local_temp_path(uri_or_path): extracted_path = extract_path_from_uri(uri_or_path) local_temp_path = Dataset._build_local_temp_path(extracted_path) + path_relative_to_tmp_dir = local_temp_path.as_posix().split("tmp", 1)[1].split("/", 1)[1] assert ( "tmp" in local_temp_path.as_posix() - and "hdfs" not in local_temp_path.as_posix() - and "s3" not in local_temp_path.as_posix() + and "hdfs" not in path_relative_to_tmp_dir + and "s3" not in path_relative_to_tmp_dir and not local_temp_path.as_posix().startswith(extracted_path) and local_temp_path.as_posix().endswith(extracted_path) ), f"Local temp path: {local_temp_path.as_posix()}"