Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ParallelTestRunner
using Test

pushfirst!(ARGS, "--verbose")

Expand All @@ -24,7 +25,7 @@ runtests(ARGS; init_code, custom_tests)
# custom worker
function test_worker(name)
if name == "needs env var"
return addworker(env=["SPECIAL_ENV_VAR"=>"42"])
return addworker(env = ["SPECIAL_ENV_VAR" => "42"])
end
return nothing
end
Expand All @@ -37,3 +38,19 @@ custom_tests = Dict(
end
)
runtests(ARGS; test_worker, custom_tests)

# failing test
custom_tests = Dict(
"failing test" => quote
@test 1 == 2
end
)
@test_throws Test.FallbackTestSetException("Test run finished with errors") runtests(ARGS; custom_tests)

# throwing test
custom_tests = Dict(
"throwing test" => quote
error("This test throws an error")
end
)
@test_throws Test.FallbackTestSetException("Test run finished with errors") runtests(ARGS; custom_tests)
Loading