Skip to content

Commit

Permalink
Fix test for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kounelisagis committed Apr 17, 2024
1 parent 8a97fb0 commit 7f0fd1b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tiledb/tests/test_vfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,10 @@ def test_ls_recursive(self):
set(expected),
set(
map(
# keep only the part after basepath
lambda x: x.split(basepath)[1][1:],
# # Keep only the paths after the basepath and normalize them to work on all platforms
lambda x: os.path.normpath(
x.split("test_vfs_ls_recursive/")[1]
).replace("\\", "/"),
self.vfs.ls_recursive(basepath),
)
),
Expand All @@ -366,8 +368,10 @@ def callback(uri, _): # we don't use the second argument 'is_dir'
set(expected),
set(
map(
# keep only the part after basepath
lambda x: x.split(basepath)[1][1:],
# Keep only the paths after the basepath and normalize them to work on all platforms
lambda x: os.path.normpath(
x.split("test_vfs_ls_recursive/")[1]
).replace("\\", "/"),
callback_results,
)
),
Expand All @@ -378,8 +382,10 @@ def callback(uri, _): # we don't use the second argument 'is_dir'
set(expected),
set(
map(
# keep only the part after basepath
lambda x: x.split(basepath)[1][1:],
# Keep only the paths after the basepath and normalize them to work on all platforms
lambda x: os.path.normpath(
x.split("test_vfs_ls_recursive/")[1]
).replace("\\", "/"),
self.vfs.ls(basepath, recursive=True),
)
),
Expand Down

0 comments on commit 7f0fd1b

Please sign in to comment.