As noted by @cstjean in https://github.com/JuliaLang/julia/pull/19880, @test a ≈ b
differs from @test_approx_eq a b
in that the former doesn't display test failures quite as nicely. We already have specialized code for displaying some kinds of comparisons nicely, so perhaps we should have more logic there to display approximate equality failures as nicely as @test_approx_eq
does.
@StefanKarpinski I would like to work on this. A little more info on what is to be done?
julia> using Test
julia> @test 2.1 ≈ 1+1
Test Failed at REPL[2]:1
Expression: 2.1 ≈ 1 + 1
Evaluated: 2.1 ≈ 2
ERROR: There was an error during testing
julia> @test 2.1 == 1+1
Test Failed at REPL[3]:1
Expression: 2.1 == 1 + 1
Evaluated: 2.1 == 2
ERROR: There was an error during testing
looks find on master now?
I believe this was addressed by https://github.com/JuliaLang/julia/pull/30721
Most helpful comment
I believe this was addressed by https://github.com/JuliaLang/julia/pull/30721