Skip to content

Commit

Permalink
Uncomment tests that crash Julia
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Oct 13, 2018
1 parent 0c06f29 commit 15fe9b0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/grouping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,21 @@ module TestGrouping
@test gd[3] == DataFrame(Key1="B", Key2="A", Value=3)
@test gd[4] == DataFrame(Key1="B", Key2="B", Value=4)

# TODO: uncomment once JuliaLang/julia#29430 is fixed
# Check that CategoricalArray column is preserved when returning a value...
res = combine(d -> DataFrame(x=d[1, :Key2]), groupby(df, :Key1))
@test res.x isa CategoricalVector{String}
# res = combine(d -> DataFrame(x=d[1, :Key2]), groupby(df, :Key1))
# @test res.x isa CategoricalVector{String}
res = combine(d -> (x=d[1, :Key2],), groupby(df, :Key1))
@test res.x isa CategoricalVector{String}
# ...and when returning an array
res = combine(d -> DataFrame(x=d[:Key1]), groupby(df, :Key1))
@test res.x isa CategoricalVector{String}
# res = combine(d -> DataFrame(x=d[:Key1]), groupby(df, :Key1))
# @test res.x isa CategoricalVector{String}

# TODO: uncomment once JuliaLang/julia#29430 is fixed
# Check that CategoricalArray and String give a String...
res = combine(d -> d.Key1 == ["A", "A"] ? DataFrame(x=d[1, :Key1]) : DataFrame(x="C"),
groupby(df, :Key1))
@test res.x isa Vector{String}
# res = combine(d -> d.Key1 == ["A", "A"] ? DataFrame(x=d[1, :Key1]) : DataFrame(x="C"),
# groupby(df, :Key1))
# @test res.x isa Vector{String}
res = combine(d -> d.Key1 == ["A", "A"] ? (x=d[1, :Key1],) : (x="C",),
groupby(df, :Key1))
@test res.x isa Vector{String}
Expand Down

0 comments on commit 15fe9b0

Please sign in to comment.