Improve code quality of Docker test setup script #797
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves the code quality of our
rspec_inside_docker.pyscript according to Python11 standards.Note that we still use the
VSCode Test Explorerextension in our setup, while in the meantime, VSCode has its own native Test explorer that Ruby LSP can use. In the long-term, we should migrate to this approach. However:Ruby LSP RSpecthat does support passing anrspecCommand, this doesn't work for us since it uses Ruby LSP internal commands to report back the results. And since Ruby LSP is still running on the host (VSCode) and not inside the Docker Container, this doesn't work.For these reasons, we stick to the VSCode Test Explorer extension for now, where we return the test results from the docker container as JSON and the extension reads it and reports it in its custom test explorer view.
For more context, see my comment here. I've also created a gist should there be people that want to use our script as well.
Tip
We should monitor Shopify/ruby-lsp#2919 for future developments on this topic, especially see this comment.