Skip to content

Commit 0ad5801

Browse files
committed
avoid colliding git clones
1 parent 3153e9b commit 0ad5801

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import re
66
import shutil
77
import sys
8+
import tempfile
89
import urllib.parse
910

1011
from pathlib import Path
@@ -14,7 +15,6 @@
1415
from poetry.core.packages.utils.link import Link
1516
from poetry.core.vcs.git import ParsedUrl
1617

17-
from poetry.config.config import Config
1818
from poetry.console.application import Application
1919
from poetry.factory import Factory
2020
from poetry.installation.executor import Executor
@@ -117,7 +117,8 @@ def mock_clone(
117117
folder = FIXTURE_PATH / "git" / parsed.resource / path
118118

119119
if not source_root:
120-
source_root = Path(Config.create().get("cache-dir")) / "src"
120+
temp_dir = tempfile.mkdtemp()
121+
source_root = Path(temp_dir) / "src"
121122

122123
dest = source_root / path
123124
dest.parent.mkdir(parents=True, exist_ok=True)

0 commit comments

Comments
 (0)