Skip to content

Commit cf4c215

Browse files
committed
test: Add home_path and user_path default dirs
1 parent 2f483c6 commit cf4c215

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/conftest.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import getpass
12
import pathlib
23
from typing import Dict
34

@@ -7,6 +8,18 @@
78
from libvcs.util import run
89

910

11+
@pytest.fixture(autouse=True, scope="session")
12+
def home_path(tmp_path_factory: pytest.TempPathFactory):
13+
return tmp_path_factory.mktemp("home")
14+
15+
16+
@pytest.fixture(autouse=True, scope="session")
17+
def user_path(home_path: pathlib.Path):
18+
p = home_path / getpass.getuser()
19+
p.mkdir()
20+
return p
21+
22+
1023
@pytest.fixture(scope="function")
1124
def parentdir(tmp_path: pathlib.Path):
1225
"""Return temporary directory for repository checkout guaranteed unique."""

0 commit comments

Comments
 (0)