From 8b1591300a144d596209554854c9982a0c3d9687 Mon Sep 17 00:00:00 2001 From: mtfishman Date: Wed, 23 Oct 2024 10:58:31 -0400 Subject: [PATCH] Fix more tests --- test/base/runtests.jl | 6 +++--- test/base/test_solvers/Project.toml | 5 +---- test/base/test_solvers/runtests.jl | 10 +++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/test/base/runtests.jl b/test/base/runtests.jl index 68b8126..84bca80 100644 --- a/test/base/runtests.jl +++ b/test/base/runtests.jl @@ -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") @@ -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 diff --git a/test/base/test_solvers/Project.toml b/test/base/test_solvers/Project.toml index dcd1d96..99a05ad 100644 --- a/test/base/test_solvers/Project.toml +++ b/test/base/test_solvers/Project.toml @@ -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" @@ -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" diff --git a/test/base/test_solvers/runtests.jl b/test/base/test_solvers/runtests.jl index 44e961e..e6e99d3 100644 --- a/test/base/test_solvers/runtests.jl +++ b/test/base/test_solvers/runtests.jl @@ -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))