Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 23, 2024
1 parent 2409fdd commit 8b15913
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
6 changes: 3 additions & 3 deletions test/base/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ITensors.BLAS.set_num_threads(1)
ITensors.disable_threaded_blocksparse()

@testset "$(@__DIR__)" begin
filenames = filter(readdir(@__DIR__)) do f
startswith("test_")(f) && endswith(".jl")(f)
filenames = filter(readdir(@__DIR__)) do file
return startswith("test_")(file) && endswith(".jl")(file)
end
@testset "Test $(@__DIR__)/$filename" for filename in filenames
println("Running $(@__DIR__)/$filename")
Expand All @@ -16,7 +16,7 @@ ITensors.disable_threaded_blocksparse()

test_dirs = ["test_solvers"]
@testset "Test $(@__DIR__)/$test_dir" for test_dir in test_dirs
println("Running $(@__DIR__)/$test_dir")
println("Running $(@__DIR__)/$test_dir/runtests.jl")
@time include(joinpath(@__DIR__, test_dir, "runtests.jl"))
end
end
5 changes: 1 addition & 4 deletions test/base/test_solvers/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
ITensorTDVP = "25707e16-a4db-4a07-99d9-4d67b7af0342"
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -11,6 +11,3 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ITensors = "0.6.7"
10 changes: 5 additions & 5 deletions test/base/test_solvers/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@eval module $(gensym())
using Test: @testset
using ITensorMPS: ITensorMPS
test_path = joinpath(pkgdir(ITensorMPS), "test")
test_files = filter(
file -> startswith(file, "test_") && endswith(file, ".jl"), readdir(test_path)
)
@testset "ITensorMPS.jl" begin
test_path = @__DIR__
test_files = filter(readdir(test_path)) do file
return startswith("test_")(file) && endswith(".jl")(file)
end
@testset "$test_path" begin
@testset "$filename" for filename in test_files
println("Running $filename")
@time include(joinpath(test_path, filename))
Expand Down

0 comments on commit 8b15913

Please sign in to comment.