Running 'testthat.R' [7s/6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(tstools)
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  > 
  > test_check("tstools")
  -- 1. Error: XLSX wide export works (@testWriteTimeseries.R#98)  ---------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE) at testthat/testWriteTimeseries.R:98
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 2. Error: XLSX transposed export works (@testWriteTimeseries.R#117)  --------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide_transposed"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE, transpose = TRUE) at testthat/testWriteTimeseries.R:117
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 3. Error: XLSX long export works (@testWriteTimeseries.R#140)  --------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
    adding: tmp/Rtmp92ZIO7/test_ts_2019_11_06.json (deflated 82%)
  -- 4. Error: imports work (@testWriteTimeseries.R#255)  ------------------------
  File does not exist.
  1: expect_equal(ts, read_ts(xlsx_wide_name)) at testthat/testWriteTimeseries.R:255
  2: quasi_label(enquo(expected), expected.label, arg = "expected")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(xlsx_wide_name)
  5: read_ts.xlsx(file)
  6: openxlsx::read.xlsx(file)
  7: read.xlsx.default(file)
  8: stop("File does not exist.")
  
  -- 5. Error: XLSX wide export works (@testWriteTimeseries.R#98)  ---------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE) at testthat/testWriteTimeseries.R:98
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 6. Error: XLSX transposed export works (@testWriteTimeseries.R#117)  --------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide_transposed"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE, transpose = TRUE) at testthat/testWriteTimeseries.R:117
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 7. Error: XLSX long export works (@testWriteTimeseries.R#140)  --------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
    adding: tmp/Rtmp92ZIO7/test_ts_2019_11_06.json (deflated 82%)
  -- 8. Error: imports work (@testWriteTimeseries.R#255)  ------------------------
  File does not exist.
  1: expect_equal(ts, read_ts(xlsx_wide_name)) at testthat/testWriteTimeseries.R:255
  2: quasi_label(enquo(expected), expected.label, arg = "expected")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(xlsx_wide_name)
  5: read_ts.xlsx(file)
  6: openxlsx::read.xlsx(file)
  7: read.xlsx.default(file)
  8: stop("File does not exist.")
  
  -- 9. Error: XLSX wide export works (@testWriteTimeseries.R#98)  ---------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE) at testthat/testWriteTimeseries.R:98
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 10. Error: XLSX transposed export works (@testWriteTimeseries.R#117)  -------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_wide_transposed"), date_format = "%Y-%m", 
         timestamp_to_fn = T, wide = TRUE, transpose = TRUE) at testthat/testWriteTimeseries.R:117
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
  -- 11. Error: XLSX long export works (@testWriteTimeseries.R#140)  -------------
  WEIRD RETURN VALUE: (nil)
  1: write_ts(tslist, format = "xlsx", fname = paste0(fn, "_long"), date_format = "%Y-%m", 
         timestamp_to_fn = T) at testthat/testWriteTimeseries.R:140
  2: openxlsx::write.xlsx(tsdf, paste0(fname, ".xlsx"))
  3: saveWorkbook(wb = wb, file = file, overwrite = overwrite)
  4: wb$saveWorkbook()
  5: write_file(head = "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">", 
         body = "<Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\"/>\n                    <Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\"/>\n                    <Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>", 
         tail = "</Relationships>", fl = file.path(relsDir, ".rels"))
  
    adding: tmp/Rtmp92ZIO7/test_ts_2019_11_06.json (deflated 82%)
  -- 12. Error: imports work (@testWriteTimeseries.R#255)  -----------------------
  File does not exist.
  1: expect_equal(ts, read_ts(xlsx_wide_name)) at testthat/testWriteTimeseries.R:255
  2: quasi_label(enquo(expected), expected.label, arg = "expected")
  3: eval_bare(get_expr(quo), get_env(quo))
  4: read_ts(xlsx_wide_name)
  5: read_ts.xlsx(file)
  6: openxlsx::read.xlsx(file)
  7: read.xlsx.default(file)
  8: stop("File does not exist.")
  
  == testthat results  ===========================================================
  [ OK: 84 | SKIPPED: 0 | WARNINGS: 15 | FAILED: 12 ]
  1. Error: XLSX wide export works (@testWriteTimeseries.R#98) 
  2. Error: XLSX transposed export works (@testWriteTimeseries.R#117) 
  3. Error: XLSX long export works (@testWriteTimeseries.R#140) 
  4. Error: imports work (@testWriteTimeseries.R#255) 
  5. Error: XLSX wide export works (@testWriteTimeseries.R#98) 
  6. Error: XLSX transposed export works (@testWriteTimeseries.R#117) 
  7. Error: XLSX long export works (@testWriteTimeseries.R#140) 
  8. Error: imports work (@testWriteTimeseries.R#255) 
  9. Error: XLSX wide export works (@testWriteTimeseries.R#98) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted