mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-18 14:13:57 +00:00
Chore: Replace subprocess.run with subprocess_run util function (#1754)
This commit is contained in:
1 parent
33b042ad06
commit
34342a9d00
26 files changed
+92
-69
No files matched your search
@@ -358,7 +358,10 @@ class TestRustAnalyzerDetection:
|
||||
def mock_access(path, mode):
|
||||
return path == scoop_path
|
||||
|
||||
with patch.object(RustAnalyzer.DependencyProvider, "_get_rust_analyzer_via_rustup", return_value=None):
|
||||
with (
|
||||
patch.object(RustAnalyzer.DependencyProvider, "_get_rust_analyzer_via_rustup", return_value=None),
|
||||
patch.object(RustAnalyzer.DependencyProvider, "_get_rustup_version", return_value=None),
|
||||
):
|
||||
with patch("platform.system", return_value="Windows"):
|
||||
with patch("shutil.which", return_value=None):
|
||||
with patch("os.path.isfile", side_effect=mock_isfile):
|
||||
@@ -390,7 +393,10 @@ class TestRustAnalyzerDetection:
|
||||
def mock_access(path, mode):
|
||||
return path == cargo_path
|
||||
|
||||
with patch.object(RustAnalyzer.DependencyProvider, "_get_rust_analyzer_via_rustup", return_value=None):
|
||||
with (
|
||||
patch.object(RustAnalyzer.DependencyProvider, "_get_rust_analyzer_via_rustup", return_value=None),
|
||||
patch.object(RustAnalyzer.DependencyProvider, "_get_rustup_version", return_value=None),
|
||||
):
|
||||
with patch("platform.system", return_value="Windows"):
|
||||
with patch("shutil.which", return_value=None):
|
||||
with patch("os.path.isfile", side_effect=mock_isfile):
|
||||
|
||||
Reference in new issue
Block a user