Last updated on 2019-08-29 08:50:22 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-gcc | 0.1.0 | 3.45 | 43.08 | 46.53 | OK | |
r-devel-linux-x86_64-fedora-clang | 0.1.0 | 71.23 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 0.1.0 | 69.93 | NOTE | |||
r-devel-windows-ix86+x86_64 | 0.1.0 | 10.00 | 79.00 | 89.00 | OK | |
r-patched-solaris-x86 | 0.1.0 | 97.00 | ERROR |
Version: 0.1.0
Check: data for non-ASCII characters
Result: NOTE
Note: found 24 marked UTF-8 strings
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86
Version: 0.1.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [7s/33s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(pins)
>
> PerformanceReporter <- R6::R6Class(
+ "PerformanceReporter",
+ inherit = Reporter,
+ public = list(
+ results = list(
+ context = character(0),
+ time = numeric(0)
+ ),
+ last_context = NA_character_,
+ last_test = NA_character_,
+ last_time = Sys.time(),
+ last_test_time = 0,
+ n_ok = 0,
+ n_skip = 0,
+ n_warn = 0,
+ n_fail = 0,
+
+ start_context = function(context) {
+ private$print_last_test()
+
+ self$last_context <- context
+ self$last_time <- Sys.time()
+ cat(paste0("\nContext: ", context, "\n"))
+ },
+
+ add_result = function(context, test, result) {
+ elapsed_time <- as.numeric(Sys.time()) - as.numeric(self$last_time)
+
+ print_message = TRUE
+ if (inherits(result, "expectation_failure") ||
+ inherits(result, "expectation_error")) {
+ self$n_fail <- self$n_fail + 1
+ } else if (inherits(result, "expectation_skip")) {
+ self$n_skip <- self$n_skip + 1
+ } else if (inherits(result, "expectation_warning")) {
+ self$n_warn <- self$n_warn + 1
+ } else {
+ print_message = FALSE
+ self$n_ok <- self$n_ok + 1
+ }
+
+ if (print_message) {
+ cat(
+ paste0(test, ": ", private$expectation_type(result), ": ", result$message),
+ "\n"
+ )
+ }
+
+ if (identical(self$last_test, test)) {
+ elapsed_time <- self$last_test_time + elapsed_time
+ self$results$time[length(self$results$time)] <- elapsed_time
+ self$last_test_time <- elapsed_time
+ }
+ else {
+ private$print_last_test()
+
+ self$results$context[length(self$results$context) + 1] <- self$last_context
+ self$results$time[length(self$results$time) + 1] <- elapsed_time
+ self$last_test_time <- elapsed_time
+ }
+
+ self$last_test <- test
+ self$last_time <- Sys.time()
+ },
+
+ end_reporter = function() {
+ private$print_last_test()
+
+ cat("\n")
+ data <- data.frame(
+ context = self$results$context,
+ time = self$results$time
+ )
+
+ summary <- aggregate(. ~ context, data, function(e) format(sum(e), width = "9", digits = "3", scientific = F))
+
+ total <- format(sum(data$time), digits = "3", scientific = F)
+
+ cat("\n")
+ cat("--- Performance Summary ----\n\n")
+ print(as.data.frame(summary), row.names = FALSE)
+
+ cat(paste0("\nTotal: ", total, "s\n"))
+
+ cat("\n")
+ cat("------- Tests Summary -------\n\n")
+ self$cat_line("OK: ", format(self$n_ok, width = 5))
+ self$cat_line("Failed: ", format(self$n_fail, width = 5))
+ self$cat_line("Warnings: ", format(self$n_warn, width = 5))
+ self$cat_line("Skipped: ", format(self$n_skip, width = 5))
+ cat("\n")
+ }
+ ),
+ private = list(
+ print_last_test = function() {
+ if (!is.na(self$last_test) &&
+ length(self$last_test) > 0 &&
+ length(self$last_test_time) > 0) {
+ cat(paste0(self$last_test, ": ", self$last_test_time, "\n"))
+ }
+
+ self$last_test <- NA_character_
+ },
+ expectation_type = function(exp) {
+ stopifnot(is.expectation(exp))
+ gsub("^expectation_", "", class(exp)[[1]])
+ }
+ )
+ )
>
> options(pins.path = tempdir())
> on.exit(options(pins.path = NULL))
>
> test_check("pins", reporter = "performance")
Context: board custom
can board_register() a custom board: 0.0221750736236572
can pin() with custom board: 0.197664737701416
can pin_find() with custom board: 0.0409004688262939
can pin_get() with custom board: 0.00694632530212402
can board_deregister() custom board: 0.0033564567565918
Context: board datatxt
can board_register() a data.txt board: 5.30969572067261
can pin_get() iris from a data.txt board: 0.352560520172119
can not evaluate expressions from data.txt board: 0.22728443145752
can board_deregister() a data.txt board: 0.00285220146179199
Context: board github
can't register github board: skip: Reason: failed to register github board
can't register github board: 0.00223159790039062
Context: board kaggle
test kaggle board: skip: Reason: kaggle board is not registered
test kaggle board: 0.00159072875976562
Context: board local
local board is registered: 0.00257039070129395
can pin() file with auto-generated name in local board: 0.0433471202850342
can pin() file to local board: 0.0103564262390137
can pin() data frame to local board: 0.00964951515197754
can pin_get() a pin from local board: 0.00763487815856934
can pin_find() the pin in any board: 0.399259090423584
can pin_find() in local board: 0.00995850563049316
can pin_remove() from local board: 0.00597691535949707
Context: board metadata
can roundtrip table metadata with no description: 0.0046989917755127
can roundtrip table metadata with description: 0.00354456901550293
can roundtrip files metadata with no description: 0.0033268928527832
can roundtrip files metadata with description: 0.189663410186768
can read empty metadata from empty text: 0.00486922264099121
can read empty metadata from invalid text: 0.00259113311767578
can read empty metadata from semi-valid text: 0.00256848335266113
Context: board packages
can pin_find() packages with empty search: 0.372328996658325
trying URL 'https://cran.rstudio.com/src/contrib/hpiR_0.2.0.tar.gz'
Content type 'application/x-gzip' length 1540852 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
can pin_find() packages with search term: 0.385547161102295
can pin_get() an specific resource: 12.0831594467163
Context: board rsc
can't register rsconnect board: skip: Reason: failed to register rsconnect board
can't register rsconnect board: 0.00226283073425293
Context: pin dataframe
can pin() data frame: 0.017521858215332
can sanitize data frame names: 0.00248622894287109
Context: pin find
can pin_find() entries across all boards: 0.766902923583984
Context: pin object
can pin() object: 0.0104708671569824
Context: pin owner
can retrieve name with pin_content_name(): 0.00366640090942383
can retrieve empty owner with pin_content_owner(): 0.00233888626098633
can retrieve empty name with pin_content_owner(): 0.00195550918579102
can parse simple names with pin_content_owner() and pin_content_name(): 0.00639939308166504
Context: pin local
can pin() remote URL: error: Timeout was reached: Resolving timed out after 5008 milliseconds
can pin() remote URL: 5.01811909675598
can pin() remote CSV with URL and name: error: Timeout was reached: Resolving timed out after 5000 milliseconds
can pin() remote CSV with URL: 0.0373952388763428
can pin() remote CSV with URL and name: 5.00814247131348
--- Performance Summary ----
context time
board custom 0.271
board datatxt 5.89
board github 0.00223
board kaggle 0.00159
board local 0.489
board metadata 0.211
board packages 12.8
board rsc 0.00226
pin dataframe 0.02
pin find 0.767
pin local 10.1
pin object 0.0105
pin owner 0.0144
Total: 30.6s
------- Tests Summary -------
OK: 50
Failed: 2
Warnings: 0
Skipped: 3
Error: Test failures
Execution halted
Flavor: r-patched-solaris-x86