Last updated on 2019-04-12 07:47:08 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.1.1 | 7.55 | 43.37 | 50.92 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 0.1.1 | 7.54 | 35.26 | 42.80 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 0.1.1 | 60.32 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 0.1.1 | 67.73 | ERROR | |||
r-devel-windows-ix86+x86_64 | 0.1.1 | 17.00 | 192.00 | 209.00 | ERROR | |
r-patched-linux-x86_64 | 0.1.1 | 8.09 | 43.78 | 51.87 | ERROR | |
r-patched-solaris-x86 | 0.1.1 | 93.80 | ERROR | |||
r-release-linux-x86_64 | 0.1.1 | 7.08 | 42.59 | 49.67 | ERROR | |
r-release-windows-ix86+x86_64 | 0.1.1 | 13.00 | 186.00 | 199.00 | ERROR | |
r-release-osx-x86_64 | 0.1.1 | OK | ||||
r-oldrel-windows-ix86+x86_64 | 0.1.1 | 11.00 | 188.00 | 199.00 | ERROR | |
r-oldrel-osx-x86_64 | 0.1.1 | OK |
Version: 0.1.1
Check: tests
Result: ERROR
Running 'testthat.R' [8s/159s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
-- 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ---------------
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ----------------------
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
-- 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ----------------------
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
-- 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ----------------------
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
-- 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ----
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
-- 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) --
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
-- 7. Error: (unknown) (@test_fetch_zones.R#120) ------------------------------
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
-- 8. Failure: Safely getting data works (@test_utils.R#18) -------------------
get_data(good_url) has length 9, not length 7.
-- 9. Error: Assignment of validity (@test_utils.R#97) ------------------------
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) -----
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
== testthat results ===========================================================
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [6s/136s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [6s/137s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [7s/134s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 0.1.1
Check: tests
Result: ERROR
Running 'testthat.R' [141s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
-- 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ---------------
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ----------------------
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
-- 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ----------------------
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
-- 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ----------------------
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
-- 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ----
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
-- 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) --
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
-- 7. Error: (unknown) (@test_fetch_zones.R#120) ------------------------------
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
-- 8. Failure: Safely getting data works (@test_utils.R#18) -------------------
get_data(good_url) has length 9, not length 7.
-- 9. Error: Assignment of validity (@test_utils.R#97) ------------------------
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) -----
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
== testthat results ===========================================================
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-devel-windows-ix86+x86_64
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [8s/130s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-patched-linux-x86_64
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [8s/390s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 11. Error: Scrubbing works (@test_utils.R#172) ─────────────────────────────
argument is of length zero
1: extract_dates(sample_day) at testthat/test_utils.R:172
══ testthat results ═══════════════════════════════════════════════════════════
OK: 73 SKIPPED: 0 FAILED: 11
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
1. ...
Error: testthat unit tests failed
Execution halted
Flavor: r-patched-solaris-x86
Version: 0.1.1
Check: tests
Result: ERROR
Running ‘testthat.R’ [8s/133s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
── 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ───────────────
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ──────────────────────
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
── 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ──────────────────────
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
── 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ──────────────────────
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
── 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ────
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
── 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) ──
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
── 7. Error: (unknown) (@test_fetch_zones.R#120) ──────────────────────────────
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
── 8. Failure: Safely getting data works (@test_utils.R#18) ───────────────────
get_data(good_url) has length 9, not length 7.
── 9. Error: Assignment of validity (@test_utils.R#97) ────────────────────────
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
── 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) ─────
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
══ testthat results ═══════════════════════════════════════════════════════════
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-release-linux-x86_64
Version: 0.1.1
Check: tests
Result: ERROR
Running 'testthat.R' [137s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
-- 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ---------------
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ----------------------
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
-- 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ----------------------
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
-- 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ----------------------
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
-- 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ----
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
-- 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) --
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
-- 7. Error: (unknown) (@test_fetch_zones.R#120) ------------------------------
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
-- 8. Failure: Safely getting data works (@test_utils.R#18) -------------------
get_data(good_url) has length 9, not length 7.
-- 9. Error: Assignment of validity (@test_utils.R#97) ------------------------
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) -----
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
== testthat results ===========================================================
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-release-windows-ix86+x86_64
Version: 0.1.1
Check: tests
Result: ERROR
Running 'testthat.R' [140s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(postal)
>
> test_check("postal")
-- 1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13) ---------------
Argument 3 must be length 1, not 0
1: testthat::expect_warning(fetch_zones_three_digit("9999999")) at testthat/test_fetch_zones.R:13
2: quasi_capture(enquo(object), capture_warnings, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, warning = function(condition) {
out$push(condition)
invokeRestart("muffleWarning")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("9999999")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 2. Failure: Five digit fetch (@test_fetch_zones.R#77) ----------------------
`fetch_zones_five_digit("86753", "11238")` did not throw an error.
-- 3. Failure: Five digit fetch (@test_fetch_zones.R#79) ----------------------
`fetch_zones_five_digit("00001", "60647")` did not throw an error.
-- 4. Failure: Five digit fetch (@test_fetch_zones.R#80) ----------------------
`fetch_zones_five_digit("11238", "00003")` did not throw an error.
-- 5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92) ----
nchar(has_priority_exceptions$full_response) is not more than 10. Difference: -10
-- 6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103) --
Argument 3 must be length 1, not 0
1: purrr::map2_dfr(origins, destinations, fetch_zones_three_digit) at testthat/test_fetch_zones.R:103
2: map2(.x, .y, .f, ...)
3: .f(.x[[i]], .y[[i]], ...)
4: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
5: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
7: out %>% clean_zones(origin_zip)
8: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
9: eval(quote(`_fseq`(`_lhs`)), env, env)
10: eval(quote(`_fseq`(`_lhs`)), env, env)
...
15: clean_zones(., origin_zip)
16: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
18: eval(quote(`_fseq`(`_lhs`)), env, env)
19: eval(quote(`_fseq`(`_lhs`)), env, env)
20: `_fseq`(`_lhs`)
21: freduce(value, `_function_list`)
22: function_list[[i]](value)
23: dplyr::bind_rows(.)
24: bind_rows_(x, .id)
-- 7. Error: (unknown) (@test_fetch_zones.R#120) ------------------------------
Argument 3 must be length 1, not 0
1: fetch_all(sample(all_possible_origins, 2), write_to = here::here("tmp", "test_file.csv")) at testthat/test_fetch_zones.R:120
2: origins %>% purrr::map_dfr(fetch_and_sleep)
3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: eval(quote(`_fseq`(`_lhs`)), env, env)
6: `_fseq`(`_lhs`)
7: freduce(value, `_function_list`)
8: withVisible(function_list[[k]](value))
9: function_list[[k]](value)
10: purrr::map_dfr(., fetch_and_sleep)
...
25: clean_zones(., origin_zip)
26: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
27: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
28: eval(quote(`_fseq`(`_lhs`)), env, env)
29: eval(quote(`_fseq`(`_lhs`)), env, env)
30: `_fseq`(`_lhs`)
31: freduce(value, `_function_list`)
32: function_list[[i]](value)
33: dplyr::bind_rows(.)
34: bind_rows_(x, .id)
-- 8. Failure: Safely getting data works (@test_utils.R#18) -------------------
get_data(good_url) has length 9, not length 7.
-- 9. Error: Assignment of validity (@test_utils.R#97) ------------------------
Argument 3 must be length 1, not 0
1: testthat::expect_message(fetch_zones_three_digit("1"), "Origin zip 001 is not in use.") at testthat/test_utils.R:97
2: quasi_capture(enquo(object), capture_messages, label = label)
3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
4: withCallingHandlers(code, message = function(condition) {
out$push(condition)
invokeRestart("muffleMessage")
})
5: eval_bare(get_expr(quo), get_env(quo))
6: fetch_zones_three_digit("1")
7: get_zones_three_digit(origin_zip = origin_zip, destination_zip = NULL, n_tries = n_tries,
verbose = verbose)
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
-- 10. Error: Interpolation of zips in between ranges (@test_utils.R#121) -----
Argument 3 must be length 1, not 0
1: testthat::expect_equal(2422, get_zones_three_digit("123") %>% interpolate_zips() %>%
nrow()) at testthat/test_utils.R:121
2: quasi_label(enquo(expected), expected.label)
3: eval_bare(get_expr(quo), get_env(quo))
4: get_zones_three_digit("123") %>% interpolate_zips() %>% nrow()
5: eval(lhs, parent, parent)
6: eval(lhs, parent, parent)
7: get_zones_three_digit("123")
8: suppressWarnings({
out <- out %>% clean_zones(origin_zip)
out <- out %>% dplyr::mutate(validity = "valid")
if (verbose) {
message(glue::glue("Recieved \\\n {as.numeric(max(out$dest_zip_end)) - as.numeric(min(out$dest_zip_start))} \\\n destination ZIPs for \\\n {as.numeric(max(out$zone)) - as.numeric(min(out$zone))} \\\n zones."))
}
})
9: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
10: out %>% clean_zones(origin_zip)
...
18: clean_zones(., origin_zip)
19: dat[!names(dat) %in% to_ignore] %>% dplyr::bind_rows() %>% tibble::as_tibble()
20: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
21: eval(quote(`_fseq`(`_lhs`)), env, env)
22: eval(quote(`_fseq`(`_lhs`)), env, env)
23: `_fseq`(`_lhs`)
24: freduce(value, `_function_list`)
25: function_list[[i]](value)
26: dplyr::bind_rows(.)
27: bind_rows_(x, .id)
== testthat results ===========================================================
OK: 83 SKIPPED: 0 FAILED: 10
1. Error: fetch_zones_three_digit() (@test_fetch_zones.R#13)
2. Failure: Five digit fetch (@test_fetch_zones.R#77)
3. Failure: Five digit fetch (@test_fetch_zones.R#79)
4. Failure: Five digit fetch (@test_fetch_zones.R#80)
5. Failure: Priority Mail exceptions are noted (@test_fetch_zones.R#92)
6. Error: 3 and 5 digit endpoints agree on zone (@test_fetch_zones.R#103)
7. Error: (unknown) (@test_fetch_zones.R#120)
8. Failure: Safely getting data works (@test_utils.R#18)
9. Error: Assignment of validity (@test_utils.R#97)
10. Error: Interpolation of zips in between ranges (@test_utils.R#121)
Error: testthat unit tests failed
Execution halted
Flavor: r-oldrel-windows-ix86+x86_64