Skip to content

Commit

Permalink
Updates for codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
1beb committed May 16, 2021
1 parent f75f394 commit e3f33a5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Imports:
stringi,
tinytex
Suggests:
arrow,
covr,
knitr,
mockery,
Expand Down
2 changes: 2 additions & 0 deletions R/codeBookGeneric.R
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ codeBookItemTxtDescriptionGeneral <- function(x, nm, meta, ...) {
#' @param ds An arrow dataset
#' @param variable A string identifying the variable
get_class <- function(ds, variable) {
# nocov start
r <- utils::capture.output(ds$schema[[variable]])
r <- r[2]
r <- gsub(variable, "", r)
Expand All @@ -396,4 +397,5 @@ get_class <- function(ds, variable) {
return("numeric")
if (grepl("dictionary", r))
return("factor")
# nocov end
}
1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
library(testthat)
# library(mockery)
library(crunchtabs)

test_check("crunchtabs")
4 changes: 0 additions & 4 deletions tests/testthat/setup.R

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-writeCodeBookLatexGeneric.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ test_that("End to end write to pdf", {
)
mockery::stub(writeCodeBookLatexGeneric, "file.open", TRUE)
expect_true(suppressWarnings(
writeCodeBookLatexGeneric(ds, meta, pdf = TRUE, logo = "ygblue", position = "c")))
writeCodeBookLatexGeneric(ds, meta, pdf = TRUE, logo = "ygblue", open = TRUE, position = "c")))
expect_true(file.remove(c("General-Dataset.tex")))
expect_true(file.remove(c("General-Dataset.pdf")))
})

0 comments on commit e3f33a5

Please sign in to comment.