Skip to content

Commit f6a0269

Browse files
authored
Test suite: Add more test coverage for warn_if_unexpected_params() (only on Julia versions prior to 1.6) (#75)
This is a fixed version of #45 that correctly targets `master`.
1 parent 4b6d126 commit f6a0269

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/runtests.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Distributed
66
import Test
77

88
# Bring some names into scope, just for convenience:
9-
using Test: @testset, @test
9+
using Test: @testset, @test, @test_logs
1010

1111
const original_JULIA_DEBUG = strip(get(ENV, "JULIA_DEBUG", ""))
1212
if isempty(original_JULIA_DEBUG)
@@ -60,3 +60,16 @@ end
6060
println("# END script output")
6161

6262
end # testset "SlurmClusterManager.jl"
63+
64+
@testset "warn_if_unexpected_params()" begin
65+
if Base.VERSION >= v"1.6"
66+
# This test is not relevant for Julia 1.6+
67+
else
68+
params = Dict(:env => ["foo" => "bar"])
69+
SlurmClusterManager.warn_if_unexpected_params(params)
70+
@test_logs(
71+
(:warn, "The user provided the `env` kwarg, but SlurmClusterManager.jl's support for the `env` kwarg requires Julia 1.6 or later"),
72+
SlurmClusterManager.warn_if_unexpected_params(params),
73+
)
74+
end
75+
end

0 commit comments

Comments
 (0)