diff --git a/src/GroupedErrors.jl b/src/GroupedErrors.jl index 1f28e0a..d90ce86 100644 --- a/src/GroupedErrors.jl +++ b/src/GroupedErrors.jl @@ -21,5 +21,8 @@ include("plot_macro.jl") include("pipeline.jl") include("analysisfunctions.jl") +exampletable() = joinpath(dirname(@__DIR__), "test", "tables") +exampletable(s) = joinpath(exampletable(), s) + end diff --git a/test/build_test_tables.jl b/test/build_test_tables.jl index 939e766..ab99f45 100644 --- a/test/build_test_tables.jl +++ b/test/build_test_tables.jl @@ -1,4 +1,4 @@ -school = loadtable(joinpath(@__DIR__, "tables", "school.csv")) +school = GroupedErrors.exampletable("school.csv") |> loadtable tables = [] #Test scatter plot diff --git a/test/runtests.jl b/test/runtests.jl index 72d152a..5bcb635 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -19,7 +19,7 @@ for i in 1:length(tables) println(i) test_table = tables[i] println(test_table) - stored_table = loadtable(joinpath(@__DIR__, "tables", "t$i.csv")) + stored_table = loadtable(GroupedErrors.exampletable("t$i.csv")) println(stored_table) atol = i == 8 ? 1e-1 : 1e-4 check_equality(stored_table, test_table, atol)