Closed christopher-dG closed 5 years ago
Not a bug, same thing as #3 (so it's applicable for #5).
Here's what gets called (get
returns a Mock
): https://github.com/JuliaLang/julia/blob/v1.2.0/stdlib/Test/src/Test.jl#L1254-L1255
mock(g -> @test(!called(g)), get; filters=[max_depth(1)])
mock(g -> @test(!called(g)), get; filters=[excluding(Test)])
Using
@test
inside ofmock
blocks sometimes doesn't work.The workaround is to compute results in the block and to use test macros afterwards:
Unfortunately, using this strategy for
@test_throws
is really ugly.I'm not sure what causes this because I've been able to use
@test
and@test_throws
in PkgTemplates' test suite just fine.