From b04b5421b780046600c9061c66a5ddc11195cb42 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 29 Apr 2025 00:08:18 -0400 Subject: [PATCH 1/2] Test suite: Add more test coverage for `warn_if_unexpected_params()` (only on Julia versions prior to 1.6) --- test/runtests.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 8772e5b..afcfb11 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -60,3 +60,16 @@ end println("# END script output") end # testset "SlurmClusterManager.jl" + +@testset "warn_if_unexpected_params()" begin + if Base.VERSION >= v"1.6" + # This test is not relevant for Julia 1.6+ + else + params = Dict(:env => ["foo" => "bar"]) + SlurmClusterManager.warn_if_unexpected_params(params) + @test_logs( + (:warn, "The user provided the `env` kwarg, but SlurmClusterManager.jl's support for the `env` kwarg requires Julia 1.6 or later"), + SlurmClusterManager.warn_if_unexpected_params(params), + ) + end +end From 929a5041b3b32f3c687149d3a5dd74df0757278e Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 29 Apr 2025 00:15:10 -0400 Subject: [PATCH 2/2] Fix a test error --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index afcfb11..bda4f85 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,7 +6,7 @@ import Distributed import Test # Bring some names into scope, just for convenience: -using Test: @testset, @test +using Test: @testset, @test, @test_logs const original_JULIA_DEBUG = strip(get(ENV, "JULIA_DEBUG", "")) if isempty(original_JULIA_DEBUG)