Closed alexander-born closed 1 year ago
Thanks for the PR to handle this but I'd rather not get into parsing another tool's config. Instead I'd like the interfaces to be open enough to allow users to perform these more niche integrations themselves.
Setting env variables is already possible with neotest.run.run
however this doesn't cover running from the summary. The run
consumer could accept an augment
function in the config which would be run for args to each call of neotest.run.run
. Inside that function, reading of pyright's config could be done and the PYTHONPATH would be set in the env
I understand and respect that decision. I thought this is a common configuration, so I threw this pr together which would benefit others as well.
I am fine with your suggestion and just put this code in my personal config.
The projects at work use execution environments with extra paths which are defined in a pyproject.toml file.
Example of pyproject.toml:
In order to make the test not fail on imports I need to modify the PYTHONPATH with both the root and all the extraPaths for the correct executionEnvironment.