Skip to content

Commit 0ffe2e2

Browse files
authored
Fix tests on Julia 1.6 (#606)
`@printf(stdout,"<1e%2.2d", -4)` now correctly gives `"<1e-04"`, which allows the values to be always aligned (the column has always a 6-character width).
1 parent 983bf02 commit 0ffe2e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/statmodels.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ m = rand(3,4)
3030

3131
@test sprint(show, StatsBase.PValue(1.0)) == "1.0000"
3232
@test sprint(show, StatsBase.PValue(1e-1)) == "0.1000"
33-
@test sprint(show, StatsBase.PValue(1e-5)) == "<1e-4"
33+
if VERSION > v"1.6.0-DEV"
34+
@test sprint(show, StatsBase.PValue(1e-5)) == "<1e-04"
35+
else
36+
@test sprint(show, StatsBase.PValue(1e-5)) == "<1e-4"
37+
end
3438
@test sprint(show, StatsBase.PValue(NaN)) == "NaN"
3539
@test_throws ErrorException StatsBase.PValue(-0.1)
3640
@test_throws ErrorException StatsBase.PValue(1.1)

0 commit comments

Comments
 (0)