Skip to content

Commit 2fdf7bd

Browse files
committed
Add skip_on_ci() to tests and fix workflow
1 parent ea851f8 commit 2fdf7bd

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tests/testthat/test-acro_add_comments.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test_that("acro_add_comments works", {
1313
acro_finalise("test", "json")
1414

1515
# Read the file content
16-
file_content <- readLines(file.path("..", "testthat", "test", "results.json"))
16+
file_content <- readLines(file.path("..", "testthat", "test", "results.json"), warn = FALSE)
1717

1818
# Check the comment exists in the results
1919
expect_true(any(grepl(comment, file_content)))

tests/testthat/test-acro_add_exception.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
test_that("acro_add_exception without initialising ACRO object first", {
2+
skip_on_ci()
23
acroEnv$ac <- NULL
34
expect_error(acro_add_exception("output_0", "The disclosive cells are structural zeros and not actually disclosive"), "ACRO has not been initialised. Please first call acro_init()")
45
})
56

67
test_that("add_exceptions works", {
7-
testthat::skip_on_cran()
8+
skip_on_ci()
89
acro_init()
910
table <- acro_crosstab(index = nursery_data[, c("health")], columns = nursery_data[, c("finance")])
1011
acro_add_exception("output_0", "The disclosive cells are structural zeros and not actually disclosive")
1112
acro_finalise("test", "json")
1213

1314
# Read the file content
14-
file_content <- readLines(file.path("..", "testthat", "test", "results.json"))
15+
file_content <- readLines(file.path("..", "testthat", "test", "results.json"), warn = FALSE)
1516
# Check the exception exists in the results
1617
expect_true(any(grepl("The disclosive cells are structural zeros and not actually disclosive", file_content)))
1718
})

0 commit comments

Comments
 (0)