Skip to content

Commit 326b53b

Browse files
committed
Fix tests and deprecations on Julia 0.6
1 parent bf0bda8 commit 326b53b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

Diff for: REQUIRE

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ StatsBase 0.11.0
55
GZip
66
SortingAlgorithms
77
Reexport
8-
Compat 0.8.4
8+
Compat 0.13.0
99
FileIO 0.1.2
1010
Juno 0.2.4

Diff for: src/other/utils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function makeidentifier(s::AbstractString)
4343
end
4444
end
4545

46-
return takebuf_string(res)
46+
return String(take!(res))
4747
end
4848

4949
function make_unique(names::Vector{Symbol}; allow_duplicates=true)

Diff for: src/statsmodels/formula.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ evt(a) = Any[a]
203203
function Terms(f::Formula)
204204
rhs = condense(distribute(dospecials(f.rhs)))
205205
tt = unique(getterms(rhs))
206-
tt = tt[!(tt .== 1)] # drop any explicit 1's
207-
noint = (tt .== 0) | (tt .== -1) # should also handle :(-(expr,1))
208-
tt = tt[!noint]
206+
tt = tt[!(tt .== 1)] # drop any explicit 1's
207+
noint = (tt .== 0) .| (tt .== -1) # should also handle :(-(expr,1))
208+
tt = tt[(!).(noint)]
209209
oo = Int[ord(t) for t in tt] # orders of interaction terms
210210
if !issorted(oo) # sort terms by increasing order
211211
pp = sortperm(oo)

Diff for: test/io.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -517,17 +517,17 @@ module TestIO
517517
df = DataFrame(Fish = ["Suzy", "Amir"], Mass = [1.5, Nullable()])
518518
io = IOBuffer()
519519
show(io, "text/html", df)
520-
str = takebuf_string(io)
520+
str = String(take!(io))
521521
@test str == "<table class=\"data-frame\"><tr><th></th><th>Fish</th><th>Mass</th></tr><tr><th>1</th><td>Suzy</td><td>1.5</td></tr><tr><th>2</th><td>Amir</td><td>#NULL</td></tr></table>"
522522

523523
# test limit attribute of IOContext is used
524524
df = DataFrame(a=collect(1:1000))
525525
ioc = IOContext(IOBuffer(), displaysize=(10, 10), limit=false)
526526
show(ioc, "text/html", df)
527-
@test length(takebuf_string(ioc.io)) > 10000
527+
@test length(String(take!(ioc.io))) > 10000
528528

529529
io = IOBuffer()
530530
show(io, "text/html", df)
531-
@test length(takebuf_string(io)) < 10000
531+
@test length(String(take!(io))) < 10000
532532

533533
end

Diff for: test/show.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module TestShow
4949
df = DataFrame(Fish = ["Suzy", "Amir"], Mass = [1.5, Nullable()])
5050
io = IOBuffer()
5151
show(io, df)
52-
str = takebuf_string(io)
52+
str = String(take!(io))
5353
@test str == """
5454
2×2 DataFrames.DataFrame
5555
│ Row │ Fish │ Mass │

0 commit comments

Comments
 (0)