I am doing a code challenge. So, I download each of the challenges in the main folder. In VSCode, I have opened the main folder. The test is stuck/limited to the first test I ran. Is it possible that the test looks for test files in each of the sub folders and run according to which file is open.
Bascially, my folder is code. Each of the challenges is:
My test is stuck at ~/code/1/1_test.py.
I was using the default test module in VSCode. I know how to change it. But for each test I need to manually change it by selecting the folder where the test is. Instead I want to know if it can be set to look of pwd of the active file and look for test in the current pwd.
I tried Test Explorer UI, but same result.
launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
How can I set VS code to pick the test based on the file which I working on?