Skip to content

Commit

Permalink
Test: add space after test failure for visual clarity (#48526)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Feb 21, 2023
1 parent 56667bb commit ba1e568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stdlib/Test/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ julia> @test foo("f") == 20
Test Failed at none:1
Expression: foo("f") == 20
Evaluated: 1 == 20
ERROR: There was an error during testing
```

Expand Down Expand Up @@ -224,6 +225,7 @@ julia> @test 1 ≈ 0.999999
Test Failed at none:1
Expression: 1 ≈ 0.999999
Evaluated: 1 ≈ 0.999999
ERROR: There was an error during testing
```
You can specify relative and absolute tolerances by setting the `rtol` and `atol` keyword arguments of `isapprox`, respectively,
Expand Down
2 changes: 2 additions & 0 deletions stdlib/Test/src/Test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ function Base.show(io::IO, t::Fail)
print(io, "\n Context: ", t.context)
end
end
println(io) # add some visual space to separate sequential failures
end

"""
Expand Down Expand Up @@ -1405,6 +1406,7 @@ julia> @testset let logi = log(im)
Test Failed at none:3
Expression: !(iszero(real(logi)))
Context: logi = 0.0 + 1.5707963267948966im
ERROR: There was an error during testing
```
"""
Expand Down

0 comments on commit ba1e568

Please sign in to comment.