Skip to content

Commit

Permalink
skip snapshot tests on oldrel
Browse files Browse the repository at this point in the history
  • Loading branch information
certara-dnavarro committed Jan 12, 2024
1 parent 2b82d72 commit bcec7f3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/testthat/test_scm_reg.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ test_that("class inheritance works", {
# objects are added to detect any changes to results (intentional or not)
# that may be introduced by future refactoring

# snapshot tests are fragile, so we don't want to run on old releases
is_oldrel <- grepl(rversions::r_oldrel()$version, R.version.string)

test_that("snapshot is preserved for ordered-categorical regression", {

skip_if(is_oldrel)

# convenience function for test
ordered_categorical_test <- function(search_direction, ...) {
suppressWarnings(scm_reg(
Expand Down Expand Up @@ -74,6 +79,8 @@ test_that("snapshot is preserved for ordered-categorical regression", {

test_that("snapshot is preserved for linear regression", {

skip_if(is_oldrel)

# convenience function for test
linear_regression_test <- function(search_direction, ...) {
suppressWarnings(scm_reg(
Expand Down Expand Up @@ -145,3 +152,5 @@ test_that("snapshot is preserved for linear regression", {
# )

})


0 comments on commit bcec7f3

Please sign in to comment.