Skip to content

Commit 7d27de8

Browse files
committed
tests/cli(test[privacy]): Expect PrivatePath-rendered paths
1 parent 4ce62b2 commit 7d27de8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/cli/test_add.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
import pytest
1414

1515
from vcspull._internal.config_reader import DuplicateAwareConfigReader
16+
from vcspull._internal.private_path import PrivatePath
1617
from vcspull.cli.add import add_repo, create_add_subparser, handle_add_command
17-
from vcspull.util import contract_user_home
1818

1919
if t.TYPE_CHECKING:
2020
import pathlib
@@ -706,7 +706,7 @@ def test_handle_add_command_path_mode(
706706
handle_add_command(args)
707707

708708
log_output = caplog.text
709-
contracted_path = contract_user_home(repo_path)
709+
contracted_path = str(PrivatePath(repo_path))
710710

711711
assert "Found new repository to import" in log_output
712712
assert contracted_path in log_output
@@ -715,7 +715,7 @@ def test_handle_add_command_path_mode(
715715
normalized_log = normalized_log.replace(str(repo_path), "<repo_path>")
716716
normalized_log = re.sub(r"add\.py:\d+", "add.py:<line>", normalized_log)
717717
if preserve_config_path_in_log:
718-
assert contract_user_home(config_file) in log_output
718+
assert str(PrivatePath(config_file)) in log_output
719719
snapshot.assert_match(
720720
{
721721
"test_id": test_id,

0 commit comments

Comments
 (0)