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

Erroring in facts block when not wrapped with @fact #37

Open
karanveerm opened this issue Jan 16, 2015 · 3 comments
Open

Erroring in facts block when not wrapped with @fact #37

karanveerm opened this issue Jan 16, 2015 · 3 comments

Comments

@karanveerm
Copy link

Consider a case like this:

foo() = 1 + "0"
facts("Testing") do
    foo()
    @fact 1 => 1
    @fact 2 => 3
    @fact 3 => 3
    @fact 4 => 4
    @fact 5 => 5
end

This will still throw an error since foo() will throw an error and the remaining lines won't execute. My main use case for FactCheck is that tests keep running even if a single line fails. Would you consider the best way to go about this being to do something like @fact foo() => anything or would it make sense to change the implementation of FactCheck such that if there is an error in the facts block, other facts blocks continue running? Thanks!

@IainNZ
Copy link
Contributor

IainNZ commented Jan 16, 2015

Thats an interesting idea, I'll have to think about that one!

@greenflash1357
Copy link
Contributor

I strongly support the suggested behavior.

@IainNZ
Copy link
Contributor

IainNZ commented Nov 24, 2015

Base.Test in Julia 0.5, or equivalently BaseTestNext https://github.com/IainNZ/BaseTestNext.jl if you're on 0.4, implements this

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

No branches or pull requests

3 participants