-
Notifications
You must be signed in to change notification settings - Fork 5
Support @testitem from VSCode #56
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56 +/- ##
==========================================
+ Coverage 46.15% 47.31% +1.16%
==========================================
Files 7 7
Lines 312 317 +5
==========================================
+ Hits 144 150 +6
+ Misses 168 167 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey! First of all thanks for your contribution it's always great to have external PRs! Regarding the changes, I am not very keen in adding an additional dependency to I actually have a need for such a flexibly interface myself for work so I would be very keen to design an API that would allow most package to:
This would also help formalize some aspects of the code and help with e.g. #49 |
|
Hey @theogf, thanks for the quick reaction! I imagined this would not be merged as is (and I understand), I just needed something and was curious to use TestPicker with The planned upgrade in API you hinted at seems a very nice improvement and indeed I'll just park this until you implement your upgrade. Additionally, if you want to get an additional pair of eyes on any draft PR for your planned upgrade feel free to ping me! |
I think I am done writing the interface now. I will open a draft PR but I still need to write a few more tests to test it on something new and then I will make a PR. Your review will be very appreciated! |
This PR is an attempt to fully support
@testitemobjects from the VSCode testing framework.The feature added in #47 unfortunately is only useful for detecting
@testitemobjects in the fuzzy picker, but will throw an error when trying to actually execute those tests.I wanted to have the nice capability of this package for interactive filtering of
@testitemobjects (to which I migrated most of my packages recently).The current implementation is very simple but relies on the addition of
TestItemRunneras a dependency. I thought about having this as an extension but the code modification is quite simpler when accepting this as direct dependency and wanted first to get a feedback from @theogf on whether such an additional feature would even be considered acceptable before putting more effort into a potential extension :D.The code now is very simply mostly because it relies on actually calling the relevant testitem detection and execution from
TestItemRunner.I am just defining a new
@testitemmacro that internally callsTestItemRunner.run_testsso that the detected@testitemexpressions can be left as they are parsedI had asked on slack whether the

TestItemRunner.run_testscan be considered public on this discussion which I am also attaching as screenshot to avoid the slackhole:As mentioned on slack by @davidanthoff, the good long term solution would probably be to do something more official directly in the
julia-vscodeorganization but that is definitely something more complex and I think this might still be a useful short-term solution (even if not merged, people can at least specifically install this PR's branch to try it out)Edit: And here is a short video of the new functionality in action:
a8b79bf8-707d-470b-be23-6bfc648aaad8.mp4