Skip to content

Commit 04fc5c0

Browse files
authored
Merge pull request #37 from JuliaAI/tweaks
add test
2 parents 249e1e8 + d48d417 commit 04fc5c0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ test_files = [
55
"traits.jl",
66
"clone.jl",
77
"accessor_functions.jl",
8+
"target_features.jl",
89
"patterns/regression.jl",
910
"patterns/static_algorithms.jl",
1011
"patterns/ensembling.jl",

test/target_features.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using Test
2+
using LearnAPI
3+
4+
struct Avocado end
5+
6+
@test isnothing(LearnAPI.target(Avocado(), "salsa"))
7+
@test isnothing(LearnAPI.weights(Avocado(), "salsa"))
8+
@test LearnAPI.features(Avocado(), "salsa") == "salsa"
9+
@test LearnAPI.features(Avocado(), (:X, :y)) == :X
10+
11+
true

0 commit comments

Comments
 (0)