-
Couldn't load subscription status.
- Fork 16
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be very useful to export items from a @testmodule, but that appears not to be possible right now, correct?
I have the following in a file called test/test_test.jl:
@testmodule TestHelpers begin
f(x, y) = x + y
export f
end
@testitem "Test the tests" setup = [TestHelpers] begin
# Try the exported function
try
f(1, 2) == 3
catch e
println("Error f(1, 2): ", e)
end
# Manually export it
f = TestHelpers.f
@test f(1, 2) == 3
endWhen I run that from the VS Code testing pane, I get this output:
Error f(1, 2): UndefVarError(:f)
Test Summary: | Pass Total Time
.../test/test_test.jl:Test the tests | 1 1 0.0s
Is there some other technique besides this hacky workaround that I might have missed?
I'm using TestItemRunner v1.0.5 and VS Code 1.95.1. Thanks.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request