Skip to content

Commit

Permalink
update tests to cover more
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-german committed Jan 30, 2019
1 parent be82f9b commit 310f613
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ df = DataFrame([i for i in data], Symbol.(colnames))
@testset "Basic Manhattan Plots (pdf and png)" begin
@time manhattan(df)
@time manhattan(df, outfile = "manhattan.pdf")
@time manhattan(df, outfile = "manhattan.svg")
@test isfile("manhattan.svg")
@test isfile("manhattan.pdf")
@test isfile("manhattan.png")
rm("manhattan.png")
rm("manhattan.svg")
rm("manhattan.pdf")
end

Expand All @@ -31,9 +34,12 @@ end
rm("testmanhat2.png")
end

@testset "Basic QQ SVG Plot" begin
@testset "Basic QQ Plots" begin
@time qq(df; titles = "QQ Plot", outfile = "qqplot.svg")
@time qq(df; titles = "QQ Plot", outfile = "qqplot.pdf")
@test isfile("qqplot.svg")
@test isfile("qqplot.pdf")
rm("qqplot.pdf")
rm("qqplot.svg")
end

Expand All @@ -44,5 +50,14 @@ end
rm("testqq.png")
end

@testset "ArgumentErrors" begin
@test_throws ArgumentError manhattan(df, pvalvar = "bad")
@test_throws ArgumentError manhattan(df, chrvar = "chrs")
@test_throws ArgumentError manhattan(df, outfile = "bad.jpeg")
@test_throws ArgumentError qq(df, outfile = "bad.jpeg")
@test_throws ArgumentError qq(df, pvalvar = "pvals", outfile = "bad.png")

end



0 comments on commit 310f613

Please sign in to comment.