I'm coding some regression tests for an API in Visual Code. I am using pytest in Python and the testing feature in Visual Studio Code. Most of my tests are fine, however I have one test which creates a virtual network but, it fails because it can't find a certain parameter. If I run the same command manually into WSL extension terminal it runs successfully.
On investigating I noticed Testing is using a different version to Python than if I run it in the Terminal:
From the terminal:
platform linux -- Python 3.10.6, pytest-7.3.1, pluggy-1.0.0
rootdir: /mnt/c/API Testing
plugins: reraise-2.1.2
collected 1 item
From Testing:
platform win32 -- Python 3.10.11, pytest-7.3.1, pluggy-1.0.0
rootdir: c:\API Testing
collected 1 item
I understand this may not cause the errors I'm seeing but I find it odd there are two different version and I don't see a way to change the version that specifically testing uses.
Has anyone seen this before? or have any suggestions on how I can sync them up?
I have searched the settings and the settings.json file for python versions all seem to be just for the whole Visual Studio Code suite rather than just the testing area
