Skip to content

Commit

Permalink
Test copy(Map(identity), eachrow(df))
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Dec 26, 2019
1 parent 2c13b21 commit 556023d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/Project.toml
Expand Up @@ -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"
13 changes: 11 additions & 2 deletions 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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 556023d

Please sign in to comment.