Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fail rather than error if can't regenerate #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

oxinabox
Copy link
Member

@oxinabox oxinabox commented Jul 3, 2018

I'm not sure this is the right way to test this.

@Evizero
Copy link
Member

Evizero commented Jul 3, 2018

There must be a simpler way to test this. Maybe a simple @test_warn to check that the warning prints and thus the code is reached.

@oxinabox
Copy link
Member Author

oxinabox commented Jul 3, 2018

There must be a simpler way to test this. Maybe a simple @test_warn to check that the warning prints and thus the code is reached.

Problem is @test fail bubbles up the testsets and fails this test.

Maybe we can define our own Testset that doesn't propagate failures?

@Evizero
Copy link
Member

Evizero commented Jul 3, 2018

or @test_broken?

@Evizero
Copy link
Member

Evizero commented Jul 3, 2018

If @test_broken works, it would at least offer a reference code of how to handle tests that fail without failing

@oxinabox
Copy link
Member Author

oxinabox commented Jul 3, 2018

@test_broken deals with expressions that are false.
Where are we are deal with tests that fail.

Consider:

julia> foo(x) = @test false
foo (generic function with 1 method)

julia> @testset "Test all the things" begin
           @test_broken foo(1)
       end
Test all the things: Test Failed
  Expression: false
Stacktrace:
 [1] foo(::Int64) at ./REPL[47]:1
 [2] macro expansion at ./REPL[49]:2 [inlined]
 [3] macro expansion at ./test.jl:860 [inlined]
 [4] anonymous at ./<missing>:?
Test Summary:       | Fail  Broken  Total
Test all the things |    1       1      2
ERROR: Some tests did not pass: 0 passed, 1 failed, 0 errored, 1 broken.

the @test still gets to trigger the testset's record
So now we get a Fail & a Broken

@johnnychen94 johnnychen94 mentioned this pull request Jul 5, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants