David Anthoff

Results 1184 comments of David Anthoff

At the end of the day `return` is only a valid statement in a function, and `@testitem`s aren't functions, but global code in a module. So one just has to...

It is valid, but it doesn't do anything outside of a function. The reason it works in testsets is that under the hood that macro puts everything into a function....

Ha, I have to admit I'm surprised, didn't expect that :) But the principle for testitems I think is still valid: one should think of them as modules, and I'm...

`@testitem`s have always used the hard scoping rules. I didn't think much about that at all when I created it, but at the end of the day this is probably...

> Are there indeed good arguments why a soft scope should not be used? Good question. The way I've thought about is that my mental model for a test item...

> I think testitems currently behave differently from regular julia code in functions YES! Because they are _not_ like code in functions. You can do things like define a type...

I think this is essentially a problem in Base... If you look at the implementation of the `@test_warn` macro [here](https://github.com/JuliaLang/julia/blob/36034abf26062acad4af9dcec7c4fc53b260dbb4/stdlib/Test/src/Test.jl#L812) you can see that it just calls the `@test` macro...

https://github.com/JuliaLang/julia/issues/47033

Still an issue, or can be closed?

Is this still an issue, or can it be closed?