Running ‘testthat.R’ [22s/25s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > if (packageVersion("testthat") >= "0.7.1.99") {
  +   library(testthat)  
  +   test_check("lubridate")
  + }
  Loading required package: lubridate
  
  Attaching package: 'lubridate'
  
  The following object is masked from 'package:base':
  
      date
  
  ── 1. Failure: interval handles POSIXlt inputs (@test-intervals.R#88)  ─────────
  unclass(interval(t1, t2)) not equal to unclass(...).
  Attributes: < Component "tzone": 1 string mismatch >
  
  ── 2. Failure: interval handles POSIXlt inputs (@test-intervals.R#95)  ─────────
  unclass(interval(t1, t2)) not equal to unclass(...).
  Attributes: < Component "tzone": 1 string mismatch >
  
  ── 3. Error: as.period handles interval objects (@test-periods.R#125)  ─────────
  subscript out of bounds
  1: expect_that(as.period(int), equals(years(1))) at testthat/test-periods.R:125
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: as.period(int)
  7: as.period(int)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 4. Error: as.period handles intervals across years correctly (@test-periods.R
  subscript out of bounds
  1: expect_equal(t2, t1 + as.period(interval(t1, t2))) at testthat/test-periods.R:134
  2: quasi_label(enquo(expected), expected.label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: as.period(interval(t1, t2))
  5: as.period(interval(t1, t2))
  6: .int_to_period(x)
  7: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  8: end[[nm]]
  9: `[[.POSIXlt`(end, nm)
  10: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 5. Error: as.period handles vector interval objects (@test-periods.R#161)  ──
  subscript out of bounds
  1: expect_equal(as.period(ints), period(years = c(1, 3))) at testthat/test-periods.R:161
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: as.period(ints)
  5: as.period(ints)
  6: .int_to_period(x)
  7: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  8: end[[nm]]
  9: `[[.POSIXlt`(end, nm)
  10: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 6. Error: as.period handles don't produce negative periods (@test-periods.R#1
  subscript out of bounds
  1: as.period(interval(ymd("1985-12-31"), ymd("1986-02-01"))) at testthat/test-periods.R:171
  2: as.period(interval(ymd("1985-12-31"), ymd("1986-02-01")))
  3: .int_to_period(x)
  4: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  5: end[[nm]]
  6: `[[.POSIXlt`(end, nm)
  7: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 7. Error: as.period handles interval objects with special start dates (@test-
  subscript out of bounds
  1: expect_that(as.period(int), equals(period(c(18, 9, 6), c("year", "month", "day")))) at testthat/test-periods.R:184
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: as.period(int)
  7: as.period(int)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 8. Error: as.period with different units handles interval objects (@test-peri
  subscript out of bounds
  1: expect_that(as.period(int), equals(period(c(18, 9, 6, 1, 2, 3), c("year", "month", 
         "day", "hour", "minute", "second")))) at testthat/test-periods.R:194
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: as.period(int)
  7: as.period(int)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 9. Error: as.period with different units handles negative interval objects (@
  subscript out of bounds
  1: expect_that(as.period(int), equals(period(-c(18, 9, 5, 1, 2, 3), c("year", "month", 
         "day", "hour", "minute", "second")))) at testthat/test-periods.R:218
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: as.period(int)
  7: as.period(int)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: start[[nm]]
  11: `[[.POSIXlt`(start, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 10. Error: as.period handles tricky intervals (@test-periods.R#238)  ────────
  subscript out of bounds
  1: expect_equal(as.period(interval(ymd("1986-01-31"), ymd("1986-02-01"))), period(days = 1)) at testthat/test-periods.R:238
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: as.period(interval(ymd("1986-01-31"), ymd("1986-02-01")))
  5: as.period(interval(ymd("1986-01-31"), ymd("1986-02-01")))
  6: .int_to_period(x)
  7: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  8: end[[nm]]
  9: `[[.POSIXlt`(end, nm)
  10: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 11. Error: as.period handles tricky negative intervals (@test-periods.R#287) 
  subscript out of bounds
  1: expect_equal(as.period(interval(ymd("1986-02-01"), ymd("1986-01-31"))), period(days = -1)) at testthat/test-periods.R:287
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: as.period(interval(ymd("1986-02-01"), ymd("1986-01-31")))
  5: as.period(interval(ymd("1986-02-01"), ymd("1986-01-31")))
  6: .int_to_period(x)
  7: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  8: start[[nm]]
  9: `[[.POSIXlt`(start, nm)
  10: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 12. Error: as.period handles NA in interval objects (@test-periods.R#346)  ──
  subscript out of bounds
  1: expect_equal(as.period(one_missing_interval, "year"), na.per) at testthat/test-periods.R:346
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: as.period(one_missing_interval, "year")
  5: as.period(one_missing_interval, "year")
  6: .int_to_period(x)
  7: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  8: end[[nm]]
  9: `[[.POSIXlt`(end, nm)
  10: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 13. Error: as.period handles vectors (@test-periods.R#374)  ─────────────────
  subscript out of bounds
  1: expect_that(as.period(int), equals(years(1:2))) at testthat/test-periods.R:374
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: as.period(int)
  7: as.period(int)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 14. Error: time_length works as expected (@test-timespans.R#32)  ────────────
  subscript out of bounds
  1: expect_that(time_length(interval(ymd("1900-01-01"), ymd("1999-12-31")), "years"), 
         is_less_than(100)) at testthat/test-timespans.R:32
  2: condition(object)
  3: expect_lt(x, expected)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: time_length(interval(ymd("1900-01-01"), ymd("1999-12-31")), "years")
  7: time_length(interval(ymd("1900-01-01"), ymd("1999-12-31")), "years")
  8: as.period(x, unit = unit)
  9: as.period(x, unit = unit)
  10: .int_to_period(x)
  11: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  12: end[[nm]]
  13: `[[.POSIXlt`(end, nm)
  14: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 15. Error: time_length works with missing intervals (@test-timespans.R#41)  ─
  subscript out of bounds
  1: expect_equal(time_length(interval(NA, ymd("2016-01-01")), unit = "year"), NA_real_) at testthat/test-timespans.R:41
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: time_length(interval(NA, ymd("2016-01-01")), unit = "year")
  5: time_length(interval(NA, ymd("2016-01-01")), unit = "year")
  6: as.period(x, unit = unit)
  7: as.period(x, unit = unit)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 16. Error: time_length works with birth date 29 Feb  (@test-timespans.R#45)  
  subscript out of bounds
  1: expect_that(round(time_length(interval(ymd("1992-02-29"), ymd("1999-02-28")), "years"), 
         4), equals(6.9973)) at testthat/test-timespans.R:45
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label)
  5: eval_bare(get_expr(quo), get_env(quo))
  6: time_length(interval(ymd("1992-02-29"), ymd("1999-02-28")), "years")
  7: time_length(interval(ymd("1992-02-29"), ymd("1999-02-28")), "years")
  8: as.period(x, unit = unit)
  9: as.period(x, unit = unit)
  10: .int_to_period(x)
  11: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  12: end[[nm]]
  13: `[[.POSIXlt`(end, nm)
  14: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 17. Error: time_length works with negative interals (@test-timespans.R#67)  ─
  subscript out of bounds
  1: expect_equal(-time_length(int, "years"), time_length(int_flip(int), "years")) at testthat/test-timespans.R:67
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: time_length(int, "years")
  5: time_length(int, "years")
  6: as.period(x, unit = unit)
  7: as.period(x, unit = unit)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 18. Error: time_length handles vectors (@test-timespans.R#94)  ──────────────
  subscript out of bounds
  1: expect_equal(round(time_length(ints, "years"), 5), c(0.20122, 52.16674, 5.04903, 
         -16.17281, -12.10439, 43.40412, -6.03011, -35.44092, -66.28715)) at testthat/test-timespans.R:94
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: time_length(ints, "years")
  5: time_length(ints, "years")
  6: as.period(x, unit = unit)
  7: as.period(x, unit = unit)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: start[[nm]]
  11: `[[.POSIXlt`(start, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ── 19. Error: time_length handles 0 length intervals (@test-timespans.R#114)  ──
  subscript out of bounds
  1: expect_equal(time_length(int, "years"), c(0, 0)) at testthat/test-timespans.R:114
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: time_length(int, "years")
  5: time_length(int, "years")
  6: as.period(x, unit = unit)
  7: as.period(x, unit = unit)
  8: .int_to_period(x)
  9: ifelse(negs, start[[nm]] - end[[nm]], end[[nm]] - start[[nm]])
  10: end[[nm]]
  11: `[[.POSIXlt`(end, nm)
  12: lapply(X = unclass(x), FUN = "[[", ..., drop = drop)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 2377 SKIPPED: 36 FAILED: 19
  1. Failure: interval handles POSIXlt inputs (@test-intervals.R#88) 
  2. Failure: interval handles POSIXlt inputs (@test-intervals.R#95) 
  3. Error: as.period handles interval objects (@test-periods.R#125) 
  4. Error: as.period handles intervals across years correctly (@test-periods.R#134) 
  5. Error: as.period handles vector interval objects (@test-periods.R#161) 
  6. Error: as.period handles don't produce negative periods (@test-periods.R#171) 
  7. Error: as.period handles interval objects with special start dates (@test-periods.R#184) 
  8. Error: as.period with different units handles interval objects (@test-periods.R#194) 
  9. Error: as.period with different units handles negative interval objects (@test-periods.R#218) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted