|
| 1 | +import MLJBase: package_name, package_url, package_license, |
| 2 | + is_wrapper, is_pure_julia, input_scitype, target_scitype, |
| 3 | + supports_weights, docstring, load_path |
| 4 | + |
1 | 5 | @testset "meta-pkg" begin |
| 6 | + @show methods(package_name) |
2 | 7 | rr = RidgeRegressor() |
3 | | - d = MLJBase.info_dict(rr) |
4 | | - @test d[:package_name] == "MLJLinearModels" |
5 | | - @test d[:package_url] == "https://github.com/alan-turing-institute/MLJLinearModels.jl" |
6 | | - @test d[:package_license] == "MIT" |
7 | | - @test d[:is_pure_julia] == true |
8 | | - @test d[:is_wrapper] == false |
| 8 | + @test package_name(rr) == "MLJLinearModels" |
| 9 | + @test package_url(rr) == |
| 10 | + "https://github.com/alan-turing-institute/MLJLinearModels.jl" |
| 11 | + @test package_license(rr) == "MIT" |
| 12 | + @test is_pure_julia(rr) == true |
| 13 | + @test is_wrapper(rr) == false |
9 | 14 | end |
10 | 15 |
|
11 | 16 | @testset "meta-reg" begin |
12 | 17 | lr = LinearRegressor() |
13 | | - d = MLJBase.info_dict(lr) |
14 | | - @test d[:input_scitype] == MLJBase.Table(MLJBase.Continuous) |
15 | | - @test d[:target_scitype] == AbstractVector{MLJBase.Continuous} |
16 | | - @test d[:supports_weights] == false |
17 | | - @test !isempty(d[:docstring]) |
18 | | - @test d[:load_path] == "MLJLinearModels.LinearRegressor" |
| 18 | + @test input_scitype(lr) == MLJBase.Table(MLJBase.Continuous) |
| 19 | + @test target_scitype(lr) == AbstractVector{MLJBase.Continuous} |
| 20 | + @test supports_weights(lr) == false |
| 21 | + @test !isempty(docstring(lr)) |
| 22 | + @test load_path(lr) == "MLJLinearModels.LinearRegressor" |
19 | 23 | end |
20 | 24 |
|
21 | 25 | @testset "meta-clf" begin |
22 | 26 | lr = LogisticClassifier() |
23 | | - d = MLJBase.info_dict(lr) |
24 | | - @test d[:input_scitype] == MLJBase.Table(MLJBase.Continuous) |
25 | | - @test d[:target_scitype] == AbstractVector{<:MLJBase.Finite} |
26 | | - @test d[:supports_weights] == false |
27 | | - @test !isempty(d[:docstring]) |
28 | | - @test d[:load_path] == "MLJLinearModels.LogisticClassifier" |
| 27 | + @test input_scitype(lr) == MLJBase.Table(MLJBase.Continuous) |
| 28 | + @test target_scitype(lr) == AbstractVector{<:MLJBase.Finite} |
| 29 | + @test supports_weights(lr) == false |
| 30 | + @test !isempty(docstring(lr)) |
| 31 | + @test load_path(lr) == "MLJLinearModels.LogisticClassifier" |
29 | 32 | end |
0 commit comments