@@ -64,10 +64,10 @@ loaded into the module `mod`.
64
64
65
65
The extent of testing is controlled by `level`:
66
66
67
- |`level` | description | tests (full list below) |
68
- |:----------------|:-------------------------------|:------------------------|
69
- | 1 | test code loading | `:model_type` |
70
- | 2 (default) | basic test of model interface | all four tests |
67
+ |`level` | description | tests (full list below) |
68
+ |:----------------|:-------------------------------|:------------------------- |
69
+ | 1 | test code loading | `:model_type`, `:traits` |
70
+ | 2 (default) | basic test of model interface | all five tests |
71
71
72
72
For extensive MLJ integration tests, instead use `MLJTestIntegration.test`, from
73
73
MLJTestIntegration.jl.
@@ -122,6 +122,8 @@ $DOC_LIST_OF_TESTS1
122
122
- `:model_type`: Check `load_path` trait is correctly overloaded by attempting to
123
123
re-import the type based on that trait's value.
124
124
125
+ - `:traits`: Apply smoke tests to model trait values.
126
+
125
127
$DOC_LIST_OF_TESTS2
126
128
127
129
See also [`MLJTestInterface.make_binary`](@ref),
@@ -144,16 +146,18 @@ function test(model_types, data...; mod=Main, level=2, throw=false, verbosity=1,
144
146
:name ,
145
147
:package_name ,
146
148
:model_type ,
149
+ :traits ,
147
150
:model_instance ,
148
151
:fitted_machine ,
149
152
:operations ,
150
- ), NTuple{6 , String}}}(undef, nmodels)
153
+ ), NTuple{7 , String}}}(undef, nmodels)
151
154
152
155
# summary table row corresponding to all tests skipped:
153
156
row0 = (
154
157
; name= " undefined" ,
155
158
package_name= " undefined" ,
156
159
model_type = " -" ,
160
+ traits = " -" ,
157
161
model_instance = " -" ,
158
162
fitted_machine = " -" ,
159
163
operations = " -" ,
@@ -190,6 +194,15 @@ function test(model_types, data...; mod=Main, level=2, throw=false, verbosity=1,
190
194
row = update! (summary, failures, row, i, :model_type , model_type, outcome)
191
195
outcome == " ×" && continue
192
196
197
+ # [traits]:
198
+ traits, outcome = MLJTestInterface. traits (
199
+ model_type;
200
+ throw,
201
+ verbosity,
202
+ )
203
+ row = update! (summary, failures, row, i, :traits , traits, outcome)
204
+ outcome == " ×" && continue
205
+
193
206
level > 1 || continue
194
207
195
208
# [model_instance]:
0 commit comments