diff --git a/fsspec/tests/abstract/copy.py b/fsspec/tests/abstract/copy.py index 01ff09c95..f79509264 100644 --- a/fsspec/tests/abstract/copy.py +++ b/fsspec/tests/abstract/copy.py @@ -120,7 +120,7 @@ def test_copy_directory_to_existing_directory( fs.touch(dummy) assert fs.isdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -195,7 +195,7 @@ def test_copy_directory_to_new_directory( target = fs_target fs.mkdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -274,7 +274,7 @@ def test_copy_glob_to_existing_directory( assert fs.ls(target) == ([] if supports_empty_directories else [dummy]) # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.cp(fs_join(source, "subdir", glob), t, recursive=recursive) assert fs.isfile(fs_join(target, "subfile1")) assert fs.isfile(fs_join(target, "subfile2")) @@ -338,7 +338,7 @@ def test_copy_glob_to_new_directory( assert not fs.exists(fs_join(target, "newdir")) # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.cp(fs_join(source, "subdir", glob), t, recursive=recursive) assert fs.isdir(fs_join(target, "newdir")) assert fs.isfile(fs_join(target, "newdir", "subfile1")) diff --git a/fsspec/tests/abstract/get.py b/fsspec/tests/abstract/get.py index 851ab81ee..5ec1f4e04 100644 --- a/fsspec/tests/abstract/get.py +++ b/fsspec/tests/abstract/get.py @@ -127,7 +127,7 @@ def test_get_directory_to_existing_directory( local_fs.mkdir(target) assert local_fs.isdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -205,7 +205,7 @@ def test_get_directory_to_new_directory( target = local_target local_fs.mkdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -278,7 +278,7 @@ def test_get_glob_to_existing_directory( assert local_fs.ls(target) == [] # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.get(fs_join(source, "subdir", glob), t, recursive=recursive) assert local_fs.isfile(local_join(target, "subfile1")) assert local_fs.isfile(local_join(target, "subfile2")) @@ -350,7 +350,7 @@ def test_get_glob_to_new_directory( assert local_fs.ls(target) == [] # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.get(fs_join(source, "subdir", glob), t, recursive=recursive) assert local_fs.isdir(local_join(target, "newdir")) assert local_fs.isfile(local_join(target, "newdir", "subfile1")) diff --git a/fsspec/tests/abstract/put.py b/fsspec/tests/abstract/put.py index 1d5f2c7be..0c3cb96d7 100644 --- a/fsspec/tests/abstract/put.py +++ b/fsspec/tests/abstract/put.py @@ -123,7 +123,7 @@ def test_put_directory_to_existing_directory( fs.touch(dummy) assert fs.isdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -198,7 +198,7 @@ def test_put_directory_to_new_directory( target = fs_target fs.mkdir(target) - for source_slash, target_slash in zip([False, True], [False, True]): + for source_slash, target_slash in product([False, True], [False, True]): s = fs_join(source, "subdir") if source_slash: s += "/" @@ -278,7 +278,7 @@ def test_put_glob_to_existing_directory( assert fs.ls(target) == ([] if supports_empty_directories else [dummy]) # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.put(local_join(source, "subdir", glob), t, recursive=recursive) assert fs.isfile(fs_join(target, "subfile1")) assert fs.isfile(fs_join(target, "subfile2")) @@ -345,7 +345,7 @@ def test_put_glob_to_new_directory( assert not fs.exists(fs_join(target, "newdir")) # With recursive - for glob, recursive in zip(["*", "**"], [True, False]): + for glob, recursive in product(["*", "**"], [True, False]): fs.put(local_join(source, "subdir", glob), t, recursive=recursive) assert fs.isdir(fs_join(target, "newdir")) assert fs.isfile(fs_join(target, "newdir", "subfile1"))