Skip to content

Commit 3202453

Browse files
committed
fix test which wasn't doing the right thing before
1 parent c3a02b5 commit 3202453

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ y2z(x) = x
9090
_, m2 = Optimisers.update(s2, m, (α = ([0.1], nothing), γ = [1,10,100],))
9191
@test only(m.α[1] .- m2.α[1]) 0.1
9292
@test norm(m.γ .- m2.γ) 10
93-
@test_throws DomainError Optimisers.update(s2, m, (α = [0.1], γ = [1,10,NaN],))
93+
# This error is thrown by apply! due to NaN input.
94+
@test_throws DomainError Optimisers.update(s2, m, (α = ([0.1], nothing), γ = [1,10,NaN],))
9495

9596
s3 = Optimisers.setup(ClipNorm(5, 1; throw=false), m)
9697
_, m3 = Optimisers.update(s3, m, (α = ([0.1], nothing), γ = [1,10,100],))

0 commit comments

Comments
 (0)