diff --git a/test/Project.toml b/test/Project.toml index 63a8df7170..16b355c9b9 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -19,6 +19,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Transducers = "28d57a85-8fef-5791-bfe6-a80928e7c999" TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9" diff --git a/test/test_copy.jl b/test/test_copy.jl index 6da1ff26f0..b86cb521e9 100644 --- a/test/test_copy.jl +++ b/test/test_copy.jl @@ -1,6 +1,7 @@ module TestCopy include("preamble.jl") +import Tables using DataFrames: DataFrame, eachrow using StructArrays: StructVector using TypedTables: Table @@ -30,8 +31,16 @@ end end @testset "$copy(_, eachrow(df))" begin df = DataFrame(a=[1:4;], b=[5:8;]) - @test_broken copy(Map(identity), eachrow(df)) ==ₜ df - # requires https://github.com/JuliaData/DataFrames.jl/pull/2055 + if Tables.materializer(eachrow(df)) == DataFrame + # requires https://github.com/JuliaData/DataFrames.jl/pull/2055 + if copy in (tcopy, dcopy) + @test_broken copy(Map(identity), eachrow(df); basesize=1) ==ₜ df + else + @test copy(Map(identity), eachrow(df)) ==ₜ df + end + else + @test_broken copy(Map(identity), eachrow(df)) ==ₜ df + end end end