mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-01 15:28:28 +01:00
testing: import virtualenv lazily
Fixes https://github.com/iterative/dvc/issues/10118
This commit is contained in:
@@ -5,7 +5,6 @@ from subprocess import check_output
|
||||
from typing import Dict, Optional
|
||||
|
||||
import pytest
|
||||
import virtualenv
|
||||
from dulwich.porcelain import clone
|
||||
from funcy import first
|
||||
from packaging import version
|
||||
@@ -24,6 +23,8 @@ class VirtualEnv:
|
||||
self.bin = self.path / ("Scripts" if os.name == "nt" else "bin")
|
||||
|
||||
def create(self) -> None:
|
||||
import virtualenv
|
||||
|
||||
virtualenv.cli_run([os.fspath(self.path)])
|
||||
|
||||
def run(self, cmd: str, *args: str, env: Optional[Dict[str, str]] = None) -> None:
|
||||
|
||||
Reference in New Issue
Block a user