Skip to content

Commit f76f3fc

Browse files
authored
Merge pull request #274 from JuliaDiff/dw/isnothing
Do not use `isnothing` for Julia 1.0 compat
2 parents 213d81c + 0cda2ab commit f76f3fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRulesTestUtils"
22
uuid = "cdddcdb0-9152-4a09-a978-84456f9df70a"
3-
version = "1.10.0"
3+
version = "1.10.1"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/testers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function test_scalar(f, z; rtol=1e-9, atol=1e-9, fdm=_fdm, fkwargs=NamedTuple(),
2020
# To simplify some of the calls we make later lets group the kwargs for reuse
2121
rule_test_kwargs = (; rtol=rtol, atol=atol, fdm=fdm, fkwargs=fkwargs, check_inferred=check_inferred, kwargs...)
2222
isapprox_kwargs = (; rtol=rtol, atol=atol, kwargs...)
23-
testset_name = isnothing(testset_name) ? "test_scalar: $f at $z" : testset_name
23+
testset_name = testset_name === nothing ? "test_scalar: $f at $z" : testset_name
2424

2525
@testset "$(testset_name)" begin
2626
# z = x + im * y
@@ -116,7 +116,7 @@ function test_frule(
116116
)
117117
# To simplify some of the calls we make later lets group the kwargs for reuse
118118
isapprox_kwargs = (; rtol=rtol, atol=atol, kwargs...)
119-
testset_name = isnothing(testset_name) ? "test_frule: $f on $(_string_typeof(args))" : testset_name
119+
testset_name = testset_name === nothing ? "test_frule: $f on $(_string_typeof(args))" : testset_name
120120
# and define a helper closure
121121
call_on_copy(f, xs...) = deepcopy(f)(deepcopy(xs)...; deepcopy(fkwargs)...)
122122

@@ -195,7 +195,7 @@ function test_rrule(
195195
)
196196
# To simplify some of the calls we make later lets group the kwargs for reuse
197197
isapprox_kwargs = (; rtol=rtol, atol=atol, kwargs...)
198-
testset_name = isnothing(testset_name) ? "test_rrule: $f on $(_string_typeof(args))" : testset_name
198+
testset_name = testset_name === nothing ? "test_rrule: $f on $(_string_typeof(args))" : testset_name
199199
# and define helper closure over fkwargs
200200
call(f, xs...) = f(xs...; fkwargs...)
201201

0 commit comments

Comments
 (0)