-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature to run testitems #18
Conversation
Hello, I have been fiddling a bit with this branch. It's very nice, but I believe I have encountered a pretty serious issue (and it is why I believe in VS they use much more sophisticated parsing through I have a dummy module with
(which is the example from
Changing
EDIT: I took a look at the EDIT2: They dont, that example in the starting page is hella misleading... I didn't look close enough before lol
(from within their own source code. |
Another small issue, inspired by julia-vscode/TestItemRunner.jl#28, is that the working directory of the code in the try
|
Thanks! The working directory should be fixed now. But on Windows, the example It can be fixed by using @testitem "Same Directory" begin
@test pwd() == realpath(@__DIR__)
end but I'm unsure whether this driveletter casing mismatch has any relevance in practice, so I'll leave it like that for now. Regarding your first comment, perhaps you need to |
Yeah exporting would also do the trick, but I also thought that it is not really realistic to expect that a package would export all the methods it is trying to test. The example with soft-scope behaviour was in the main package README so i thought that was the case, but by looking at the code I could not really find what would enable that behaviour. The showcasing example from the video works like that, but probably he just exported the function he tests. |
I've tried the example in VS Code, and I got the same error. |
I think this works quite well now. I will merge it and publish a new release soon. Then we can see if any missed bugs emerge. |
Did not want to open another issue. I thought that it would be useful to mention in the readme section on testitems the discussion about scope we talked about. I can make a PR in the afternoon. |
This is intended to adopt the feature recently added in VSCode allowing to run individual
@testitem
blocks in Julia files from the editor UI.Work in progress.
Todo:
Preview:
testitem.webm