Skip to content

Commit

Permalink
Remove unreliable test that fails in R-devel
Browse files Browse the repository at this point in the history
Failing because the expected Rprof() error
does not always show up in the error stream.
From win-builder:

* using log directory 'd:/RCompile/CRANguest/R-devel/proffer.Rcheck'
* using R Under development (unstable) (2020-03-11 r77925)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'proffer/DESCRIPTION' ... OK
* this is package 'proffer' version '0.1.0'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... Note_to_CRAN_maintainers
Maintainer: 'William Michael Landau <[email protected]>'
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking serialization versions ... OK
* checking whether package 'proffer' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking for future file timestamps ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [5s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking examples ...
** running examples for arch 'i386' ... [3s] OK
** running examples for arch 'x64' ... [3s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [4s] ERROR
  Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(proffer)
  >
  > test_check("proffer")
  -- 1. Failure: arguments to record_rprof() (@test-profile.R#35)  ---------------
  `record_rprof(replicate(100, sample.int(10000)), bogus = argument)` threw an error with unexpected message.
  Expected match: "bogus"
  Actual message: "object 'argument' not found"
  Backtrace:
   1. testthat::expect_error(...)
   6. proffer::record_rprof(replicate(100, sample.int(10000)), bogus = argument)

  == testthat results  ===========================================================
  [ OK: 54 | SKIPPED: 5 | WARNINGS: 0 | FAILED: 1 ]
  1. Failure: arguments to record_rprof() (@test-profile.R#35)

  Error: testthat unit tests failed
  Execution halted
** running tests for arch 'x64' ... [4s] ERROR
  Running 'testthat.R' [4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(proffer)
  >
  > test_check("proffer")
  -- 1. Failure: arguments to record_rprof() (@test-profile.R#35)  ---------------
  `record_rprof(replicate(100, sample.int(10000)), bogus = argument)` threw an error with unexpected message.
  Expected match: "bogus"
  Actual message: "object 'argument' not found"
  Backtrace:
   1. testthat::expect_error(...)
   6. proffer::record_rprof(replicate(100, sample.int(10000)), bogus = argument)

  == testthat results  ===========================================================
  [ OK: 54 | SKIPPED: 5 | WARNINGS: 0 | FAILED: 1 ]
  1. Failure: arguments to record_rprof() (@test-profile.R#35)

  Error: testthat unit tests failed
  Execution halted
* checking PDF version of manual ... OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 2 ERRORs
  • Loading branch information
wlandau-lilly committed Mar 22, 2020
1 parent 5541de5 commit 54caf16
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/testthat/test-profile.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ test_that("arguments to record_rprof()", {
rprof <- record_rprof(replicate(1e2, sample.int(1e4)))
prof <- profile::read_rprof(rprof)
expect_silent(profile::validate_profile(prof))

rprof <- record_rprof(
replicate(1e2, sample.int(1e4)),
rprof = rprof,
Expand All @@ -29,12 +28,5 @@ test_that("arguments to record_rprof()", {
# Needs fix in {profile}
suppressWarnings(prof2 <- profile::read_rprof(rprof))
expect_silent(profile::validate_profile(prof2))

expect_gt(nrow(prof2$samples), nrow(prof$samples))

expect_error(
record_rprof(replicate(1e2, sample.int(1e4)), bogus = argument),
"bogus",
fixed = TRUE
)
})

0 comments on commit 54caf16

Please sign in to comment.