I would like to set env variable for django test in vscode. These env variables will be different from env variables to be used in django run server.
- I can run a django test case through command line -
python manage.py test
. - In Pycharm I can run a test case by clicking on a green play button right next to the test case. In edit configuration I can set env variable.
But in vscode I am unable to run a particular test case. I dont see any play button next to test class name. I am also unable to set env variables that would be used in a test case.
设置env变量的一种方法是在从终端运行vs代码之前通过终端。但这还不够灵活。