On 13/03/2019 12:59 p.m., William Dunlap wrote:
The complaint

test_check("huxtable")
      -- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
      `openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.

comes from your call to testthat::expect_silent()

test_that("Data written in appropriate format", {
   hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
   wb <- as_Workbook(hx)
   expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))


Perhaps you should suggest to the authors of testthat that it would be nice
if expect_silent() showed some of the text of the messages, etc., instead
of just saying that messages were produced.

Yes.

By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.

That could be the source of the error: it's a violation of CRAN policy to write to the current directory. An obvious way to test this would be to make it unwriteable.

Duncan Murdoch


comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <davidhughjo...@gmail.com>
wrote:

Hi all,

My package has errors on CRAN's Linux and Solaris:

https://cran.r-project.org/web/checks/check_results_huxtable.html

which I can't reproduce on my local OSX Machine, nor on Linux on Travis.

Does anyone have any general hints on how to reproduce and/or debug such
errors?

Specifically the error relates to a call to openxlsx::saveWorkbook
producing a message. openxlsx hasn't changed recently, though.

Cheers,
David

         [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

        [[alternative HTML version deleted]]

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to