Open
Description
the example in the README.md
currently does not work.
module MyPackage
using TestItems
function foo(x)
return x*x
end
@testitem "Test for foo" begin
x = foo("bar")
@test x == "barbar"
end
end
since we are not exporting foo
or calling MyPackage.foo
, we get an undefined variable error.
Is the example above a not yet implemented end goal or It is not really the intended behaviour anymore and we are supposed to either export all methods we want to test or just explicit the scope?
Why not invisibly prepend MyPackage.
to all symbols defined in the package and called within the @testitem
body, when the test is run? It would simulate the soft-scope behaviour in the example and keep the sandbox at the same time.
Metadata
Metadata
Assignees
Labels
No labels