-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Unit testing syntax @testset let
#815
Comments
Apart from the arguably nicer syntax, what is the benefit of the above compared to julia> @testset begin
local logi = log(im)
@test imag(logi) == π/2
@test !iszero(real(logi))
end which is compatible with older Julia versions? |
Better ergonomics. It's a huge pain to need to write out Also the nice part about Compat.jl is I can write backwards-compatible code without needing to miss out on the current Julia API goodness. |
@aviatesk would you be up for pushing your PR JuliaLang/julia#50151 to here as well? Or maybe comment on if there’s a sensible workaround. Like a |
The new unit testing syntax on Julia 1.9 is extremely useful. For example:
The downside is that it's only Julia 1.9, so I can't actually use it in my packages, as I want to maintain compatibility with Julia 1.6.
So, it would be great if this syntax could be added to Compat.jl!
Best,
Miles
The text was updated successfully, but these errors were encountered: