TestItemRunner.jl
TestItemRunner.jl copied to clipboard
Bug: Module docstring breaks detection of tests
In the following MWE package:
module Foo
using TestItems
greet() = print("Hello World!")
@testitem "Test1" begin
@test 1 + 1 == 2
end
end # module Foo
With the recommended test/runtests.jl:
using TestItemRunner
@run_package_tests
TestItemRunner runs well:
Test Summary: | Pass Total Time
Package | 1 1 0.1s
Testing Foo tests passed
However, adding a docstring at the top of the module:
"Foo"
module Foo
[ test of file elided ]
Makes this package detect zero tests:
Test Summary: |Time
Package | None 0.0s
Testing Foo tests passed
Detection of @testitem is not tested. I recommend that
Fixed in https://github.com/julia-vscode/TestItemDetection.jl/pull/21, tests in https://github.com/julia-vscode/JuliaWorkspaces.jl/pull/22.