Skip to content

Commit

Permalink
Test suite: Add more test coverage for warn_if_unexpected_params()
Browse files Browse the repository at this point in the history
…(only on Julia versions prior to 1.6)
  • Loading branch information
DilumAluthge committed Feb 9, 2025
1 parent 03df383 commit 19e1470
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@ end
@test_throws ErrorException SlurmClusterManager.get_slurm_jobid_int()
end
end

@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

0 comments on commit 19e1470

Please sign in to comment.