Skip to content

Commit 2314796

Browse files
committed
.
1 parent 64a52f0 commit 2314796

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,18 @@
11
test_that("find_python returns a valid path", {
22
testthat::skip_on_cran()
3-
43
python_path <- Sys.which("python3")
5-
64
if (python_path == "") {
75
python_path <- Sys.which("python")
86
}
9-
107
expect_true(python_path != "")
118
})
129

1310
test_that("install_acro function exists and is callable", {
1411
testthat::skip_on_cran()
15-
1612
expect_true(is.function(install_acro))
1713
})
1814

1915
test_that("create_virtualenv function exists and is callable", {
2016
testthat::skip_on_cran()
21-
2217
expect_true(is.function(create_virtualenv))
2318
})
24-
25-
test_that("install_acro stops when python not found", {
26-
# Mock Sys.which to return empty string (simulates Python not installed)
27-
with_mock(
28-
`base::Sys.which` = function(x) "",
29-
expect_error(
30-
install_acro(envname = "test-env", python = NULL),
31-
"Python not found in PATH"
32-
)
33-
)
34-
})
35-
36-
test_that("create_virtualenv stops when python not found", {
37-
# Mock Sys.which to return empty string
38-
with_mock(
39-
`base::Sys.which` = function(x) "",
40-
expect_error(
41-
create_virtualenv(),
42-
"Python not found in PATH"
43-
)
44-
)
45-
})

0 commit comments

Comments
 (0)