Skip to content

more informative @test x ≈ y failure message #55812

Open
@stevengj

Description

It would be nice to have a more informative failure message for a @test x ≈ y that:

  1. If one of the operands iszero, and the caller didn't pass a explicit atol, warn them that they might want to specify an atol (or rewrite e.g. x - y ≈ 0 to x ≈ y), and direct them to the isapprox docs.
  2. If it failed a relative tolerance (rtol) check, print out the computed relative error norm(x - y) / max(norm(x), norm(y)). See also report error magnitude on @test x ≈ y failure #55613

(I feel like this has been raised before, but I can't find an issue?)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    stdlibJulia's standard librarytestsystemThe unit testing framework and Test stdlib

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions