Skip to content

Support setting environmental variables for the test runner #17171

@brettcannon

Description

@brettcannon

Discussed in #16760

Originally posted by JohnSpeno July 22, 2021
In the microsoft-python discord, I asked:

Is there a way to have the DYLD_LIBRARY_PATH environmental variable set for the built-in test discovery/runner? I set it up for debugging + debugging tests via launch.json but that isn't integrated with the testing UI which is what I hope to use. This is on macOS 11.4 (big sur) with vscode Version: 1.58.2 and all extensions up to date. Thanks. Note: launching using code . in a shell with the env set properly apparently doesn't propagate DYLD_LIBRARY_PATH as a macOS safety feature these days.

And Brett Cannon said:

There currently isn't, but if you could open a feature request at https://github.com/microsoft/vscode-python that would be appreciated!

so I am doing that.

I find getting environmental variables set for various parts of VS Code to be difficult currently. I can work around that by running code . in my pre-configured shell environment to launch vscode on my project and it mostly works. The DYLD_LIBRARY_PATH might be a special case due to hardened runtimes on macOS but I'm not exactly sure.

Thanks.

Metadata

Metadata

Assignees

Labels

area-testingcommunity askFeature request that the community expressed interest infeature-requestRequest for new features or functionalityneeds proposalNeed to make some design decisions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions