Skip to content

Commit 2e7844c

Browse files
committed
tests(test_cli): Fix paths
1 parent 648bed4 commit 2e7844c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_cli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pathlib
2+
import shutil
23
import typing as t
34

45
import pytest
@@ -20,7 +21,7 @@ def test_sync_cli_non_existent(tmp_path: pathlib.Path) -> None:
2021

2122

2223
def test_sync(
23-
home_path: pathlib.Path,
24+
user_path: pathlib.Path,
2425
config_path: pathlib.Path,
2526
tmp_path: pathlib.Path,
2627
git_repo: GitSync,
@@ -132,7 +133,7 @@ class SyncBrokenFixture(t.NamedTuple):
132133
ids=[test.test_id for test in SYNC_BROKEN_REPO_FIXTURES],
133134
)
134135
def test_sync_broken(
135-
home_path: pathlib.Path,
136+
user_path: pathlib.Path,
136137
config_path: pathlib.Path,
137138
tmp_path: pathlib.Path,
138139
git_repo: GitSync,
@@ -144,10 +145,10 @@ def test_sync_broken(
144145
) -> None:
145146
runner = CliRunner()
146147

147-
github_projects = home_path / "github_projects"
148+
github_projects = user_path / "github_projects"
148149
my_git_repo = github_projects / "my_git_repo"
149150
if my_git_repo.is_dir():
150-
my_git_repo.rmdir()
151+
shutil.rmtree(my_git_repo)
151152

152153
with runner.isolated_filesystem(temp_dir=tmp_path):
153154
config = {

0 commit comments

Comments
 (0)