From 8cb7e4948da7561ba9eba86fe9c97c6da7dc71dc Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Wed, 23 Aug 2023 17:33:22 +0545 Subject: [PATCH] tests: dvcfs: use fspath while testing (#9872) get_file does not support PathLike objects. fsspec does not support them in get_file. See https://github.com/fsspec/filesystem_spec/issues/896. Fixes test failures in dvc-webhdfs and dvc-hdfs. --- dvc/testing/api_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/testing/api_tests.py b/dvc/testing/api_tests.py index 925b25844..1f0932a74 100644 --- a/dvc/testing/api_tests.py +++ b/dvc/testing/api_tests.py @@ -117,10 +117,10 @@ class TestAPI: assert fobj.read() == b"script1" tmp = make_tmp_dir("temp-download") - fs.get_file("data/foo", tmp / "foo") + fs.get_file("data/foo", (tmp / "foo").fs_path) assert (tmp / "foo").read_text() == "foo" - fs.get_file("scripts/script1", tmp / "script1") + fs.get_file("scripts/script1", (tmp / "script1").fs_path) assert (tmp / "script1").read_text() == "script1" fs.get("/", (tmp / "all").fs_path, recursive=True)