Skip to content

Commit 9e3cfc0

Browse files
authored
choosetests: return a namedtuple (instead of a tuple) (#42723)
to make it easier to add more information in the future
1 parent 9557259 commit 9e3cfc0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/choosetests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ const TESTNAMES = [
3333

3434
"""
3535
36-
`tests, net_on, exit_on_error, seed = choosetests(choices)` selects a set of tests to be
36+
`(; tests, net_on, exit_on_error, seed) = choosetests(choices)` selects a set of tests to be
3737
run. `choices` should be a vector of test names; if empty or set to
3838
`["all"]`, all tests are selected.
3939
4040
This function also supports "test collections": specifically, "linalg"
4141
refers to collections of tests in the correspondingly-named
4242
directories.
4343
44-
Upon return:
44+
The function returns a named tuple with the following elements:
4545
- `tests` is a vector of fully-expanded test names,
4646
- `net_on` is true if networking is available (required for some tests),
4747
- `exit_on_error` is true if an error in one test should cancel
@@ -205,5 +205,5 @@ function choosetests(choices = [])
205205
empty!(tests)
206206
end
207207

208-
tests, net_on, exit_on_error, use_revise, seed
208+
return (; tests, net_on, exit_on_error, use_revise, seed)
209209
end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using Base: Experimental
1010
include("choosetests.jl")
1111
include("testenv.jl")
1212

13-
tests, net_on, exit_on_error, use_revise, seed = choosetests(ARGS)
13+
(; tests, net_on, exit_on_error, use_revise, seed) = choosetests(ARGS)
1414
tests = unique(tests)
1515

1616
if Sys.islinux()

0 commit comments

Comments
 (0)