From 1e954dec6a0595c432f62b7b2dd09e73cd0d8b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=B6nch?= Date: Fri, 17 Mar 2023 20:34:24 +0100 Subject: [PATCH] convert windows paths properly into posix path --- datalad_dataverse/tests/test_dataset.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/datalad_dataverse/tests/test_dataset.py b/datalad_dataverse/tests/test_dataset.py index 0b0d9f6..491a03e 100644 --- a/datalad_dataverse/tests/test_dataset.py +++ b/datalad_dataverse/tests/test_dataset.py @@ -4,7 +4,10 @@ At least as long as we are using that API layer. """ -from pathlib import PurePosixPath +from pathlib import ( + Path, + PurePosixPath, +) import json from datalad_next.tests.utils import md5sum @@ -58,7 +61,7 @@ def test_file_handling( def check_rename_file(odd, fileid, name='place.txt'): - new_path = PurePosixPath('fresh') / name + new_path = PurePosixPath(*(('fresh',) + Path(name).parts)) assert not odd.has_path(new_path) assert odd.has_fileid(fileid) odd.rename_file(new_path, fileid)