-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib
Milestone
Description
Using Base.Test on master,
@testset "Testing 1..3" for i=1:3
@test 1 == 1
end
results in
Test Summary: | Pass Total
Testing 1..3 | 1 1
Test Summary: | Pass Total
Testing 1..3 | 1 1
Test Summary: | Pass Total
Testing 1..3 | 1 1
as expected. However, adding a continue statement set to trigger on i=2, causes the whole testset to stop on i=2 and not continue to i=3.
@testset "Testing 1..3" for i=1:3
if i%2 == 0
continue
end
@test 1 == 1
end
results in
Test Summary: | Pass Total
Testing 1..3 | 1 1
Furthermore, once I have run one testset in a REPL that contained a call to continue, any regular (non-continued) testset now returns Nothing. i.e.
@testset "Testing 1..3" for i=1:3
@test 1 == 1
end
returns
3-element Array{Union{Base.Test.DefaultTestSet,Base.Test.FallbackTestSet,Void},1}:
nothing
nothing
nothing
and does not print any test results to the terminal.
I can confirm that this also happens on release-0.5
Maybe having the continue statement not interact with a testset is by design, but having one testset with a continue make all future REPL testset's not correct is definitely a bug.
Metadata
Metadata
Assignees
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviortestsystemThe unit testing framework and Test stdlibThe unit testing framework and Test stdlib