Skip to content

Commit

Permalink
ignore attributes in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBeannie committed Aug 22, 2024
1 parent 565ff7e commit 77c5354
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions tests/testthat/test-unvalidated-sim_gs_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ test_that("regular logrank test", {
)
)
class(expected) <- c("simtrial_gs_wlr", class(expected))
attr(expected, "method") <- unique(observed$parameter[observed$sim_id == 1])
expect_equal(observed, expected)
expect_equal(observed, expected, ignore_attr = TRUE)
})

test_that("regular logrank test parallel", {
Expand Down Expand Up @@ -148,8 +147,7 @@ test_that("regular logrank test parallel", {
)
)
class(expected) <- c("simtrial_gs_wlr", class(expected))
attr(expected, "method") <- unique(observed$parameter[observed$sim_id == 1])
expect_equal(observed, expected)
expect_equal(observed, expected, ignore_attr = TRUE)
})

test_that("weighted logrank test by FH(0, 0.5)", {
Expand Down Expand Up @@ -189,8 +187,7 @@ test_that("weighted logrank test by FH(0, 0.5)", {
)
)
class(expected) <- c("simtrial_gs_wlr", class(expected))
attr(expected, "method") <- unique(observed$parameter[observed$sim_id == 1])
expect_equal(observed, expected)
expect_equal(observed, expected, ignore_attr = TRUE)
})

test_that("weighted logrank test by MB(3)", {
Expand Down Expand Up @@ -230,8 +227,7 @@ test_that("weighted logrank test by MB(3)", {
)
)
class(expected) <- c("simtrial_gs_wlr", class(expected))
attr(expected, "method") <- unique(observed$parameter[observed$sim_id == 1])
expect_equal(observed, expected)
expect_equal(observed, expected, ignore_attr = TRUE)
})

test_that("weighted logrank test by early zero (6)", {
Expand Down Expand Up @@ -271,8 +267,7 @@ test_that("weighted logrank test by early zero (6)", {
)
)
class(expected) <- c("simtrial_gs_wlr", class(expected))
attr(expected, "method") <- unique(observed$parameter[observed$sim_id == 1])
expect_equal(observed, expected)
expect_equal(observed, expected, ignore_attr = TRUE)
})

test_that("RMST", {
Expand Down

0 comments on commit 77c5354

Please sign in to comment.