Skip to content

Commit bfd278a

Browse files
committed
☂️ Improve coverage for Lanczos
1 parent 96218f0 commit bfd278a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/core-test/correlations_and_spectrum.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@
3838
@inferred spectrum(H, ω_l2, c_ops, a', a; solver = Lanczos())
3939
end
4040

41+
@testset "Verbose mode Lanczos" begin
42+
cout = stdout
43+
r, w = redirect_stdout()
44+
nout = @async read(r, String)
45+
spectrum(H, ω_l2, c_ops, a', a; solver = Lanczos(verbose = 2, maxiter = 2, tol = 1e-16));
46+
redirect_stdout(cout)
47+
close(w)
48+
out = fetch(nout)
49+
outlines = split(out, '\n', keepempty = false)
50+
@test last(outlines) == "spectrum(): Consider increasing maxiter and/or tol"
51+
end
52+
4153
# tlist and τlist checks
4254
t_fft_wrong = [0, 1, 10]
4355
t_wrong1 = [1, 2, 3]

0 commit comments

Comments
 (0)