Skip to content

Commit 21b820b

Browse files
committed
fix: use os.path.samefile for accurate directory comparison
1 parent cba7d66 commit 21b820b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_cli_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ async def test_find_project_root_at_root():
613613
with tempfile.TemporaryDirectory() as temp_dir:
614614
os.makedirs(os.path.join(temp_dir, ".git"))
615615
# in a git repo, find_project_root should not go beyond the git root
616-
assert find_project_root(temp_dir, ".git") == temp_dir
616+
assert os.path.samefile(find_project_root(temp_dir, ".git"), temp_dir)
617617
assert find_project_root(temp_dir, ".vectorcode") is None
618618

619619

@@ -623,4 +623,4 @@ async def test_find_project_config_dir_at_root():
623623
git_dir = os.path.join(temp_dir, ".git")
624624
os.makedirs(git_dir)
625625
# in a git repo, find_project_root should not go beyond the git root
626-
assert await find_project_config_dir(temp_dir) == git_dir
626+
assert os.path.samefile(await find_project_config_dir(temp_dir), git_dir)

0 commit comments

Comments
 (0)