Skip to content

Commit

Permalink
bugfix historical versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tdhock committed Oct 6, 2024
1 parent 91458fd commit f725fa3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: atime
Type: Package
Title: Asymptotic Timing
Version: 2024.10.3
Version: 2024.10.5
Authors@R: c(
person("Toby", "Hocking",
email="[email protected]",
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changes in version 2024.10.5

- bugfix: atime_test again outputs historical versions which were specified in ...

Changes in version 2024.10.3

- atime_pkg generates files such as _test_name_.png with underscores instead of special characters such as > which are not supported on some file systems, including github actions (https://github.com/tdhock/atime/issues/62).
Expand Down
2 changes: 1 addition & 1 deletion R/test.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ get_test_args <- function(){
}

atime_test <- function(N, setup, expr, times, seconds.limit, verbose, pkg.edit.fun, result, ...){
get_test_args()
c(get_test_args(), ...)
}

atime_test_list <- function(N, setup, expr, times, seconds.limit, verbose, pkg.edit.fun, result, tests=NULL, ...){
Expand Down
15 changes: 15 additions & 0 deletions tests/testthat/test-CRAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,18 @@ test_that("error for new unit name conflicting with existing", {
}, "result is 1 row data frame with column(s) named median, kilobytes (reserved for internal use); please fix by changing the column name(s) in your results", fixed=TRUE)
})

test_that("atime_test outputs historical versions", {
atest <- atime::atime_test(
setup = {
DT <- as.data.table(as.list(1:N))
measure.vars <- lapply(1:N, function(i) {
x = rep(NA, N)
x[i] = i
x
})
},
expr = data.table:::melt(DT, measure.vars = measure.vars),
Slow = "fd24a3105953f7785ea7414678ed8e04524e6955", # Parent of the merge commit (https://github.com/Rdatatable/data.table/commit/ed72e398df76a0fcfd134a4ad92356690e4210ea) of the PR (https://github.com/Rdatatable/data.table/pull/5054) that fixes the issue
Fast = "ed72e398df76a0fcfd134a4ad92356690e4210ea") # Merge commit of the PR (https://github.com/Rdatatable/data.table/pull/5054) that fixes the issue
expect_identical(names(atest), c("setup", "expr", "Slow", "Fast"))
})

0 comments on commit f725fa3

Please sign in to comment.