Skip to content

Commit 736e7d7

Browse files
committed
portable tests
1 parent 4f9a652 commit 736e7d7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_project.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ def test_relative_paths():
15781578
with tempfile.TemporaryDirectory() as tmp:
15791579
data_path = Path(tmp, "data/myfile.dat")
15801580

1581-
assert RATapi.project.try_relative_to(data_path, tmp) == "data/myfile.dat"
1581+
assert Path(RATapi.project.try_relative_to(data_path, tmp)) == Path("data/myfile.dat")
15821582

15831583

15841584
def test_relative_paths_warning():
@@ -1593,4 +1593,7 @@ def test_relative_paths_warning():
15931593
"If you would like to share your project, make sure your custom files "
15941594
"are in a subfolder of the project save location.",
15951595
):
1596-
assert RATapi.project.try_relative_to(data_path, relative_path) == "/tmp/project/data/mydata.dat"
1596+
assert (
1597+
Path(RATapi.project.try_relative_to(data_path, relative_path))
1598+
== Path("/tmp/project/data/mydata.dat").resolve()
1599+
)

0 commit comments

Comments
 (0)