11"""Tests for ProjectService."""
22
33import os
4+ from pathlib import Path
45
56import pytest
67
@@ -73,7 +74,7 @@ async def test_project_operations_sync_methods(
7374 """
7475 # Generate a unique project name for testing
7576 test_project_name = f"test-project-{ os .urandom (4 ).hex ()} "
76- test_project_path = str (tmp_path / "test-project" )
77+ test_project_path = (tmp_path / "test-project" ). as_posix ( )
7778
7879 # Make sure the test directory exists
7980 os .makedirs (test_project_path , exist_ok = True )
@@ -590,8 +591,8 @@ async def test_move_project_nonexistent(project_service: ProjectService, tmp_pat
590591async def test_move_project_db_mismatch (project_service : ProjectService , tmp_path ):
591592 """Test moving a project that exists in config but not in database."""
592593 test_project_name = f"test-move-mismatch-{ os .urandom (4 ).hex ()} "
593- old_path = str (tmp_path / "old-location" )
594- new_path = str (tmp_path / "new-location" )
594+ old_path = (tmp_path / "old-location" ). as_posix ( )
595+ new_path = (tmp_path / "new-location" ). as_posix ( )
595596
596597 # Create directories
597598 os .makedirs (old_path , exist_ok = True )
@@ -624,7 +625,7 @@ async def test_move_project_db_mismatch(project_service: ProjectService, tmp_pat
624625async def test_move_project_expands_path (project_service : ProjectService , tmp_path ):
625626 """Test that move_project expands ~ and relative paths."""
626627 test_project_name = f"test-move-expand-{ os .urandom (4 ).hex ()} "
627- old_path = str (tmp_path / "old-location" )
628+ old_path = (tmp_path / "old-location" ). as_posix ( )
628629
629630 # Create old directory
630631 os .makedirs (old_path , exist_ok = True )
@@ -635,7 +636,7 @@ async def test_move_project_expands_path(project_service: ProjectService, tmp_pa
635636
636637 # Use a relative path for the move
637638 relative_new_path = "./new-location"
638- expected_absolute_path = os .path .abspath (relative_new_path )
639+ expected_absolute_path = Path ( os .path .abspath (relative_new_path )). as_posix ( )
639640
640641 # Move project using relative path
641642 await project_service .move_project (test_project_name , relative_new_path )
0 commit comments