How to run some environment setting cmd before pytest in VSCode #20163
|
I was running VSCode on a remote server which most environments are loaded by |
Answered by
brettcannon
Nov 7, 2022
Replies: 1 comment 2 replies
|
Not specifically. Can you run the commands before you load VS Code? Otherwise you can try to use a debugging configuration to tweak things and run your tests under a debugger. The last option I can think of is specifying a different script for the path to pytest and have that do the loading for you. Beyond that the only thing I can think of is using something like |
2 replies
Answer selected by
shaoqx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not specifically. Can you run the commands before you load VS Code? Otherwise you can try to use a debugging configuration to tweak things and run your tests under a debugger. The last option I can think of is specifying a different script for the path to pytest and have that do the loading for you.
Beyond that the only thing I can think of is using something like
subprocessto run the command for you (assuming it doesn't need to set environment variables).