You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
the example in the
README.md
currently does not work.since we are not exporting
foo
or callingMyPackage.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.The text was updated successfully, but these errors were encountered: