Skip to content

Second run of test_package("feather") gives errors: loading dplyr namespace is the culprit #192

Open
@BillDunlap

Description

In R-3.3.0 I loaded the feather and testthat packages and ran test_package("feather"). There were no problems. I ran test_package("feather") a second time and got four errors.

library(feather)
library(testthat)
test_package("feather")
class: .......................
read: ...
roundtrip-vector: ....................

DONE ===========================================================================

test_package("feather")
class: .......1.2.............
read: .34
roundtrip-vector: ....................

Failed -------------------------------------------------------------------------

  1. Failure: basic access (@test-class.R#17) ------------------------------------
    iris.f[, 1:5] not identical to iris.tbl[, 1:5].
    Objects equal but not identical
  2. Failure: basic access (@test-class.R#19) ------------------------------------
    iris.f[1:5] not identical to iris.tbl[1:5].
    Objects equal but not identical
  3. Failure: multiplication works (@test-read.R#6) ------------------------------
    read_feather(iris_example, columns = 1:3) not identical to as_data_frame(iris)[1:3].
    Objects equal but not identical
  4. Failure: multiplication works (@test-read.R#8) ------------------------------
    read_feather(iris_example, columns = "Species") not identical to as_data_frame(iris)["Species"].
    Objects equal but not identical

DONE ===========================================================================
Error: Test failures

I think this happens because test-roundtrip-vector.R has the side effect of loading the dplyr
package and it disagrees with the tibble package on how to subscript tbl_df objects. E.g.,
in a fresh session of R:

iris.tbl <- tibble::as_data_frame(iris)
class(iris.tbl[,1:5])
[1] "tbl_df" "tbl" "data.frame"
loadNamespace("dplyr")
<environment: namespace:dplyr>
class(iris.tbl[,1:5])
[1] "tbl_df" "data.frame"

This is not really feather's problem, but there is a common author to all the packages
involved.

-Bill Dunlap

p.s. Here are the versions of packages involved:

sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] feather_0.0.1

loaded via a namespace (and not attached):
[1] magrittr_1.5 R6_2.1.2 assertthat_0.1 parallel_3.3.0 DBI_0.4-1 tools_3.3.0 dplyr_0.4.3
[8] tibble_1.0 Rcpp_0.12.5

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions