Skip to content

Commit

Permalink
Update Mooncake test
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Nov 4, 2024
1 parent 8762089 commit 7f9ead2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/ad/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ function test_ad(f, x, broken=(); rtol=1e-6, atol=1e-6)
catch exc
# TODO(penelopeysm):
# @test_throws AssertionError (expr...) doesn't work, unclear why
@test exc isa AssertionError
# We use `isdefined` here since `hasproperty` for modules is not consistent with `getproperty`
# Ref https://github.com/JuliaLang/julia/issues/47150
if isdefined(Mooncake, :MooncakeRuleCompilationError)
@test exc isa getproperty(Mooncake, :MooncakeRuleCompilationError)
else
@test exc isa AssertionError
end
end
# TODO: The above @test_throws happens because of
# https://github.com/compintell/Mooncake.jl/issues/319. If that test
Expand Down

0 comments on commit 7f9ead2

Please sign in to comment.