Running ‘testthat.R’ [3s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(getTBinR)
  > 
  > test_check("getTBinR")
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100   498    0   498    0     0    498      0 --:--:--  0:00:01 --:--:--   476
  100  272k    0  272k    0     0   272k      0 --:--:--  0:00:01 --:--:--  247k
  ── 1. Error: (unknown) (@test-get_data.R#11)  ──────────────────────────────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: get_data(url = url, save_name = "test_data", save = TRUE, download_data = TRUE) at testthat/test-get_data.R:11
  2: data.table::fread(url)
  3: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100 10434    0 10434    0     0  10434      0 --:--:-- --:--:-- --:--:-- 34322
  ── 2. Error: (unknown) (@test-get_data_dict.R#4)  ──────────────────────────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: get_data_dict(download_data = TRUE, save = TRUE) at testthat/test-get_data_dict.R:4
  2: get_data(url = url, download_data = download_data, save = save, save_name = dict_save_name, 
         return = return, verbose = verbose)
  3: data.table::fread(url)
  4: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100  1951    0  1951    0     0   1951      0 --:--:--  0:00:01 --:--:--  1912
  100  272k    0  272k    0     0   272k      0 --:--:--  0:00:01 --:--:--  253k
  ── 3. Error: (unknown) (@test-get_tb_burden.R#4)  ──────────────────────────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: get_tb_burden(download_data = TRUE, save = TRUE) at testthat/test-get_tb_burden.R:4
  2: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  3: data.table::fread(url)
  4: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100  1951    0  1951    0     0   1951      0 --:--:--  0:00:01 --:--:--  1830
  100  272k    0  272k    0     0   272k      0 --:--:--  0:00:01 --:--:--  244k
  ── 4. Error: map_tb_burden produces a plot (@test-map_tb_burden.R#6)  ──────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: map_tb_burden(download_data = TRUE, save = TRUE) at testthat/test-map_tb_burden.R:6
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: data.table::fread(url)
  6: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100  272k    0  272k    0     0   272k      0 --:--:--  0:00:01 --:--:--  256k
  ── 5. Error: map_tb_burden produces a plot when a log transform is used (@test-m
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: map_tb_burden(download_data = TRUE, save = TRUE, trans = "log") at testthat/test-map_tb_burden.R:14
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: data.table::fread(url)
  6: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
  ── 6. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#2
  Data not found locally at: /tmp/RtmpmZBP5a/TB_burden.rds
   Permission to download has not been given. 
  If the data exists locally, check the path and save_name.
  If it does not exist locally then change download_data to TRUE to download the data.
  Set save to TRUE to save the data for local use.
  1: map_tb_burden(interactive = TRUE) at testthat/test-map_tb_burden.R:22
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: stop("Data not found locally at: ", data_path, "\n Permission to download has not been given. \nIf the data exists locally, check the path and save_name.\nIf it does not exist locally then change download_data to TRUE to download the data.\nSet save to TRUE to save the data for local use.")
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100  1951    0  1951    0     0   1951      0 --:--:-- --:--:-- --:--:--  2071
  100  272k    0  272k    0     0   272k      0 --:--:-- --:--:-- --:--:--  273k
  ── 7. Error: plot_tb_burden produces a plot (@test-plot_tb_burden.R#4)  ────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: plot_tb_burden(download_data = TRUE, save = TRUE) at testthat/test-plot_tb_burden.R:4
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: data.table::fread(url)
  6: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
  ── 8. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R
  Data not found locally at: /tmp/RtmpmZBP5a/TB_burden.rds
   Permission to download has not been given. 
  If the data exists locally, check the path and save_name.
  If it does not exist locally then change download_data to TRUE to download the data.
  Set save to TRUE to save the data for local use.
  1: plot_tb_burden(interactive = TRUE) at testthat/test-plot_tb_burden.R:11
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: stop("Data not found locally at: ", data_path, "\n Permission to download has not been given. \nIf the data exists locally, check the path and save_name.\nIf it does not exist locally then change download_data to TRUE to download the data.\nSet save to TRUE to save the data for local use.")
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100   498    0   498    0     0    498      0 --:--:--  0:00:01 --:--:--   483
  100  272k    0  272k    0     0   272k      0 --:--:--  0:00:01 --:--:--  251k
  ── 9. Error: plot_tb_burden_overview produces a plot (@test-plot_tb_burden_overv
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: plot_tb_burden_overview(download_data = TRUE, save = TRUE) at testthat/test-plot_tb_burden_overview.R:5
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: data.table::fread(url)
  6: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
  ── 10. Error: plot_tb_burden_overview produces an interactive plot (@test-plot_t
  Data not found locally at: /tmp/RtmpmZBP5a/TB_burden.rds
   Permission to download has not been given. 
  If the data exists locally, check the path and save_name.
  If it does not exist locally then change download_data to TRUE to download the data.
  Set save to TRUE to save the data for local use.
  1: plot_tb_burden_overview(interactive = TRUE) at testthat/test-plot_tb_burden_overview.R:12
  2: prepare_df_plot(df = df, dict = dict, metric = metric, metric_label = metric_label, 
         countries = countries, compare_to_region = compare_to_region, facet = facet, 
         download_data = download_data, save = save, burden_save_name = burden_save_name, 
         dict_save_name = dict_save_name, verbose = verbose)
  3: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  4: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  5: stop("Data not found locally at: ", data_path, "\n Permission to download has not been given. \nIf the data exists locally, check the path and save_name.\nIf it does not exist locally then change download_data to TRUE to download the data.\nSet save to TRUE to save the data for local use.")
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100   498    0   498    0     0    498      0 --:--:-- --:--:-- --:--:--   540
  100  272k    0  272k    0     0   272k      0 --:--:-- --:--:-- --:--:--  279k
  ── 11. Error: (unknown) (@test-prepare_df_plot.R#4)  ───────────────────────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: prepare_df_plot(download_data = TRUE, save = TRUE) at testthat/test-prepare_df_plot.R:4
  2: get_tb_burden(download_data = download_data, save = save, burden_save_name = burden_save_name, 
         verbose = verbose, ...)
  3: get_data(url = url, download_data = download_data, data_trans_fn = trans_burden_data, 
         save = save, save_name = burden_save_name, return = return, verbose = verbose)
  4: data.table::fread(url)
  5: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  100 10434    0 10434    0     0  10434      0 --:--:-- --:--:-- --:--:-- 35489
  ── 12. Error: (unknown) (@test-search_data_dict.R#5)  ──────────────────────────
  GnuTLS recv error (-110): The TLS connection was non-properly terminated.
  1: search_data_dict(var = "country", download_data = TRUE, save = TRUE) at testthat/test-search_data_dict.R:5
  2: get_data_dict(download_data = download_data, save = save, dict_save_name = dict_save_name, 
         verbose = verbose, ...)
  3: get_data(url = url, download_data = download_data, save = save, save_name = dict_save_name, 
         return = return, verbose = verbose)
  4: data.table::fread(url)
  5: curl::curl_download(input, tt, mode = "wb", quiet = !showProgress)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 0 SKIPPED: 0 FAILED: 12
  1. Error: (unknown) (@test-get_data.R#11) 
  2. Error: (unknown) (@test-get_data_dict.R#4) 
  3. Error: (unknown) (@test-get_tb_burden.R#4) 
  4. Error: map_tb_burden produces a plot (@test-map_tb_burden.R#6) 
  5. Error: map_tb_burden produces a plot when a log transform is used (@test-map_tb_burden.R#14) 
  6. Error: map_tb_burden produces an interactive plot (@test-map_tb_burden.R#22) 
  7. Error: plot_tb_burden produces a plot (@test-plot_tb_burden.R#4) 
  8. Error: plot_tb_burden produces an interactive plot (@test-plot_tb_burden.R#11) 
  9. Error: plot_tb_burden_overview produces a plot (@test-plot_tb_burden_overview.R#5) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted