Skip to content

Commit 7c03aa1

Browse files
committed
fix verbosity tests
1 parent 1d76680 commit 7c03aa1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/verbosity.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using LinearSolve
22
using LinearSolve: LinearVerbosity
3-
using SciMLVerbosity: Verbosity
4-
using Logging
3+
using SciMLVerbosity: SciMLVerbosity, Verbosity
54
using Test
65

76
A = [1.0 0 0 0
@@ -11,8 +10,13 @@ A = [1.0 0 0 0
1110
b = rand(4)
1211
prob = LinearProblem(A, b)
1312

14-
@test_logs (:warn, "Falling back to LU factorization") solve(prob, verbose = LinearVerbosity(default_lu_fallback = Verbosity.Warn()))
13+
@test_logs (:warn, "LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(prob,
14+
verbose=LinearVerbosity(default_lu_fallback=Verbosity.Warn()))
1515

16-
@test_logs (:info, "Falling back to LU factorization") solve(prob, verbose = LinearVerbosity(default_lu_fallback = Verbosity.Info()))
16+
@test_logs (:warn, "LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(
17+
prob, verbose = true)
1718

18-
@test_logs min_level = Logging.Info solve(prob, verbose = LinearVerbosity(Verbosity.None()))
19+
@test_logs min_level = SciMLVerbosity.Logging.Warn solve(prob, verbose = false)
20+
21+
@test_logs (:info, "LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(prob,
22+
verbose=LinearVerbosity(default_lu_fallback=Verbosity.Info()))

0 commit comments

Comments
 (0)