Skip to content

Commit d294023

Browse files
Fix verbosity log tests to use regex matching
The SciMLLogging package now adds a prefix to log messages ("Verbosity toggle: <option_name> \n ..."), so tests that used exact string matching for log messages were failing. Changed the tests to use regex patterns instead, which matches the message content regardless of any prefix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent aa7f12e commit d294023

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/verbosity.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,19 @@ end
101101
prob = LinearProblem(A, b)
102102

103103
@test_logs (:warn,
104-
"LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(
104+
r"LU factorization failed, falling back to QR factorization\. `A` is potentially rank-deficient\.") solve(
105105
prob,
106106
verbose = LinearVerbosity(default_lu_fallback = WarnLevel()))
107107

108108
@test_logs (:info,
109-
"LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(
109+
r"LU factorization failed, falling back to QR factorization\. `A` is potentially rank-deficient\.") solve(
110110
prob,
111111
verbose = LinearVerbosity(default_lu_fallback = InfoLevel()))
112112

113113
verb = LinearVerbosity(default_lu_fallback = WarnLevel())
114114

115115
@test_logs (:warn,
116-
"LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient.") solve(
116+
r"LU factorization failed, falling back to QR factorization\. `A` is potentially rank-deficient\.") solve(
117117
prob,
118118
verbose = verb)
119119
end

0 commit comments

Comments
 (0)