From 310f613846a9fc2c000cf9b1243f698aef7050bd Mon Sep 17 00:00:00 2001 From: Chris German Date: Tue, 29 Jan 2019 23:36:32 -0800 Subject: [PATCH] update tests to cover more --- test/runtests.jl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 66455dc..53dd796 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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 @@ -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 @@ -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 +