|
1 | | -using DistributionFits |
2 | | -using Test |
3 | | -using Random: Random |
4 | | -using LoggingExtras |
5 | | - |
6 | | -#using Aqua; Aqua.test_all(DistributionFits) # ambiguities from other packages |
7 | | -#using JET; JET.report_package(DistributionFits) # |
8 | | -#invalid possible error due to quantile may accept/return an Array (we pass a scalar) |
9 | | -#only report problems in this module: |
10 | | -#using JET; JET.report_package(DistributionFits; target_modules=(@__MODULE__,)) # |
11 | | - |
12 | | -@testset "optimize error" begin |
13 | | - @test_throws Exception DistributionFits.optimize(x -> x * x, -1, 1) |
14 | | -end |
15 | | -# Optim package for interactive testing |
16 | | -i_loadlibs = () -> begin |
17 | | - push!(LOAD_PATH, expanduser("~/julia/scimltools/")) # access local package repo |
18 | | - push!(LOAD_PATH, expanduser("~/julia/18_tools/scimltools/")) # access local package repo |
| 1 | +tmpf = () -> begin |
| 2 | + push!(LOAD_PATH, expanduser("~/julia/devtools/")) # access local pack |
| 3 | + push!(LOAD_PATH, joinpath(pwd(), "test/")) # access local pack |
19 | 4 | end |
20 | | -using Optim: Optim, optimize |
21 | 5 |
|
22 | | -DistributionFitsOptimExt = isdefined(Base, :get_extension) ? |
23 | | - Base.get_extension(DistributionFits, :DistributionFitsOptimExt) : |
24 | | - DistributionFits.DistributionFitsOptimExt |
25 | | - |
26 | | -@testset "optimize set in __init__ after using Optim" begin |
27 | | - # set in __init__ |
28 | | - @test DistributionFits.df_optimizer isa DistributionFitsOptimExt.OptimOptimizer |
| 6 | +using Test, SafeTestsets |
| 7 | +const GROUP = get(ENV, "GROUP", "All") # defined in in CI.yml |
| 8 | +@show GROUP |
| 9 | + |
| 10 | +@time begin |
| 11 | + if GROUP == "All" || GROUP == "Basic" |
| 12 | + #@safetestset "Tests" include("test/test_optim.jl") |
| 13 | + @time @safetestset "test_optim" include("test_optim.jl") |
| 14 | + #@safetestset "Tests" include("test/fitstats.jl") |
| 15 | + @time @safetestset "fitstats" include("fitstats.jl") |
| 16 | + #@safetestset "Tests" include("test/univariate/test_univariate.jl") |
| 17 | + @time @safetestset "test_univariate" include("univariate/test_univariate.jl") |
| 18 | + end |
| 19 | + if GROUP == "All" || GROUP == "JET" |
| 20 | + #@safetestset "Tests" include("test/test_JET.jl") |
| 21 | + @time @safetestset "test_JET" include("test_JET.jl") |
| 22 | + #@safetestset "Tests" include("test/test_aqua.jl") |
| 23 | + @time @safetestset "test_Aqua" include("test_aqua.jl") |
| 24 | + end |
29 | 25 | end |
30 | 26 |
|
31 | | -#include("test/testutils.jl") |
32 | | -include("testutils.jl") |
33 | | - |
34 | | -#include("test/fitstats.jl") |
35 | | -include("fitstats.jl") |
36 | | - |
37 | | -#include("test/univariate/test_univariate.jl") |
38 | | -include("univariate/test_univariate.jl") |
39 | | - |
40 | | -# test coverage of set_optimize (already called in init) |
41 | | - |
42 | | -# print method ambiguities |
43 | | -println("Potentially stale exports: ") |
44 | | -display(Test.detect_ambiguities(DistributionFits)) |
45 | | -println() |
46 | | - |
47 | | -using JET: JET |
48 | | -@testset "JET" begin |
49 | | - @static if VERSION ≥ v"1.9.2" |
50 | | - JET.test_package(DistributionFits; target_modules=(@__MODULE__,)) # |
51 | | - end |
52 | | -end; |
53 | | - |
0 commit comments