Skip to content

Commit

Permalink
fix lint and codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Feb 8, 2024
1 parent c779006 commit 4332322
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/testthat/examples/two-orderly-files/orderly.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
orderly2::orderly_artefact("Some data", "data.rds")
d <- data.frame(a = 1:10, x = runif(10), y = 1:10 + runif(10))
saveRDS(d, "data.rds")
3 changes: 3 additions & 0 deletions tests/testthat/examples/two-orderly-files/two-orderly-files.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
orderly2::orderly_artefact("Some data", "data.rds")
d <- data.frame(a = 1:10, x = runif(10), y = 1:10 + runif(10))
saveRDS(d, "data.rds")
10 changes: 10 additions & 0 deletions tests/testthat/test-run.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ test_that("raises deprecation warning for orderly.R", {
)
})

test_that("throws error if orderly.R and <reportname>.R found", {
path <- test_prepare_orderly_example("two-orderly-files")
envir <- new.env()
err <- expect_error(
orderly_run_quietly("two-orderly-files", root = path,
envir = envir),
paste("Please only create two-orderly-files.R file,",
"orderly.R has been deprecated"))
})


test_that("Can run explicit case without orderly", {
path <- test_prepare_orderly_example("explicit")
Expand Down
5 changes: 4 additions & 1 deletion tests/testthat/test-zzz-location-http.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ describe("http location integration tests", {
meta <- read_string(
file.path(root_tmp$path, ".outpack", "metadata", id_tmp))

orderly_location_http$new(url)$push_file(find_file_by_hash(root_tmp, hash), hash)
orderly_location_http$new(url)$push_file(
find_file_by_hash(root_tmp, hash),
hash
)

## Trigger the error directly:
cl <- outpack_http_client$new(url)
Expand Down

0 comments on commit 4332322

Please sign in to comment.