Skip to content

Commit

Permalink
rm warning as this is normal behavior, adjust test, fixes #128
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Apr 23, 2024
1 parent afdb1dc commit 1741890
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions R/digests.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,24 @@
changed <- names(new_digest)[ unlist(new_digest[existed]) != unlist(old_digest[existed]) ]
if(length(changed) > 0){
for(name in changed){
.multilog_warn(paste(name, "has changed."))
.multilog_info(paste(name, "has changed."))
}
warning()
return(FALSE)
}
}

for(name in removed){
.multilog_debug(paste(name, "was removed."))
.multilog_info(paste(name, "was removed."))
return(FALSE)
}

for(name in added){
.multilog_debug(paste(name, "was added."))
.multilog_info(paste(name, "was added."))
return(FALSE)
}

return(TRUE)
};
}

.combine_digests <- function(new, old) {
intersection <- intersect(names(new), names(old))
Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/test-updating-datapackager-version.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ test_that("can update", {
oldDigest$cars_over_20<-"123456789"
DataPackageR:::.save_digest(oldDigest,file.path(tempdir(),"subsetCars"))

suppressWarnings({
expect_warning(build_res <- package_build(file.path(tempdir(), "subsetCars")))
})

expect_no_warning(build_res <- package_build(file.path(tempdir(), "subsetCars")))
expect_identical(
build_res,
normalizePath(file.path(tempdir(),"subsetCars_1.0.tar.gz"),winslash = "/")
Expand Down

0 comments on commit 1741890

Please sign in to comment.