From 54caf169b71a2cce07ec747e7f54658e8dca12e8 Mon Sep 17 00:00:00 2001 From: wlandau Date: Sun, 22 Mar 2020 16:29:39 -0400 Subject: [PATCH] Remove unreliable test that fails in R-devel 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 ' * 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 --- tests/testthat/test-profile.R | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/testthat/test-profile.R b/tests/testthat/test-profile.R index 7388b8a..6a55bb4 100644 --- a/tests/testthat/test-profile.R +++ b/tests/testthat/test-profile.R @@ -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, @@ -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 - ) })