Skip to content

Commit

Permalink
Make grouping.jl test pass when using include (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan authored Dec 26, 2019
1 parent 8902a08 commit 7b1ab38
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/grouping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ end
show(io, gd)
str = String(take!(io.io))
@test str == """
GroupedDataFrame with 4 groups based on key: A
$GroupedDataFrame with 4 groups based on key: A
First Group (1 row): A = 1
│ Row │ A │ B │ C │
│ │ Int64 │ String │ Float32 │
Expand All @@ -1078,7 +1078,7 @@ end
show(io, gd, allgroups=true)
str = String(take!(io.io))
@test str == """
GroupedDataFrame with 4 groups based on key: A
$GroupedDataFrame with 4 groups based on key: A
Group 1 (1 row): A = 1
│ Row │ A │ B │ C │
│ │ Int64 │ String │ Float32 │
Expand Down Expand Up @@ -1111,7 +1111,7 @@ end


@test sprint(show, "text/html", gd) ==
"<p><b>GroupedDataFrame with 4 groups based on key: A</b></p>" *
"<p><b>$GroupedDataFrame with 4 groups based on key: A</b></p>" *
"<p><i>First Group (1 row): A = 1</i></p><table class=\"data-frame\">" *
"<thead><tr><th></th><th>A</th><th>B</th><th>C</th></tr><tr><th></th>" *
"<th>Int64</th><th>String</th><th>Float32</th></tr></thead>" *
Expand All @@ -1122,7 +1122,7 @@ end
"<tbody><tr><th>1</th><td>4</td><td>A\\nC</td><td>4.0</td></tr></tbody></table>"

@test sprint(show, "text/latex", gd) == """
GroupedDataFrame with 4 groups based on key: A
$GroupedDataFrame with 4 groups based on key: A
First Group (1 row): A = 1
Expand All @@ -1149,22 +1149,22 @@ end

gd = groupby(DataFrame(a=[Symbol("&")], b=["&"]), [1,2])
@test sprint(show, gd) === """
GroupedDataFrame with 1 group based on keys: a, b
$GroupedDataFrame with 1 group based on keys: a, b
Group 1 (1 row): a = :&, b = "&"
│ Row │ a │ b │
│ │ Symbol │ String │
├─────┼────────┼────────┤
│ 1 │ & │ & │"""

@test sprint(show, "text/html", gd) ==
"<p><b>GroupedDataFrame with 1 group based on keys: a, b</b></p><p><i>" *
"<p><b>$GroupedDataFrame with 1 group based on keys: a, b</b></p><p><i>" *
"First Group (1 row): a = :&amp;, b = \"&amp;\"</i></p>" *
"<table class=\"data-frame\"><thead><tr><th></th><th>a</th><th>b</th></tr>" *
"<tr><th></th><th>Symbol</th><th>String</th></tr></thead><tbody><tr><th>1</th>" *
"<td>&amp;</td><td>&amp;</td></tr></tbody></table>"

@test sprint(show, "text/latex", gd) == """
GroupedDataFrame with 1 group based on keys: a, b
$GroupedDataFrame with 1 group based on keys: a, b
First Group (1 row): a = :\\&, b = "\\&"
Expand Down

0 comments on commit 7b1ab38

Please sign in to comment.