Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
andrjohns committed Jan 5, 2025
1 parent cdfbd69 commit fe07ccd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-install.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ test_that("install_cmdstan() successfully installs cmdstan", {

test_that("install_cmdstan() errors if installation already exists", {
install_dir <- cmdstan_default_install_path()
dir <- file.path(install_dir, "cmdstan-2.23.0")
dir <- file.path(install_dir, "cmdstan-2.35.0")
if (!dir.exists(dir)) {
dir.create(dir, recursive = TRUE)
}
expect_warning(
install_cmdstan(dir = install_dir, overwrite = FALSE,
version = "2.23.0", wsl = FALSE),
version = "2.35.0", wsl = FALSE),
"An installation already exists",
fixed = TRUE
)
Expand Down Expand Up @@ -74,13 +74,13 @@ test_that("install_cmdstan() errors if it times out", {

test_that("install_cmdstan() errors if invalid version or URL", {
expect_error(
install_cmdstan(version = "2.23.2", wsl = os_is_wsl()),
"Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.23.2/cmdstan-2.23.2.tar.gz'\nPlease check if the supplied version number is valid."
install_cmdstan(version = "2.35.5", wsl = os_is_wsl()),
"Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.35.5/cmdstan-2.35.5.tar.gz'\nPlease check if the supplied version number is valid."
)
expect_error(
install_cmdstan(release_url = "https://github.com/stan-dev/cmdstan/releases/download/v2.23.2/cmdstan-2.23.2.tar.gz",
install_cmdstan(release_url = "https://github.com/stan-dev/cmdstan/releases/download/v2.35.5/cmdstan-2.35.5.tar.gz",
wsl = os_is_wsl()),
"Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.23.2/cmdstan-2.23.2.tar.gz'\nPlease check if the supplied release URL is valid."
"Download of CmdStan failed with error: cannot open URL 'https://github.com/stan-dev/cmdstan/releases/download/v2.35.5/cmdstan-2.35.5.tar.gz'\nPlease check if the supplied release URL is valid."
)
expect_error(
install_cmdstan(release_url = "https://github.com/stan-dev/cmdstan/releases/tag/v2.24.0", wsl = os_is_wsl()),
Expand Down

0 comments on commit fe07ccd

Please sign in to comment.