diff --git a/test/runtests.jl b/test/runtests.jl index 533cf93..c27fdd0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -45,7 +45,11 @@ for (M, f, arity) in DiffRules.diffrules(; filter_modules=nothing) derivs = DiffRules.diffrule(M, f, :foo, :bar) @eval begin let - foo, bar = rand(1:10), rand() + if "mod" == string($M.$f) + foo, bar = rand() + 13, rand() + 5 # make sure x/y is not integer + else + foo, bar = rand(1:10), rand() + end dx, dy = $(derivs[1]), $(derivs[2]) if !(isnan(dx)) @test isapprox(dx, finitediff(z -> $M.$f(z, bar), float(foo)), rtol=0.05)