Closed
Description
-
Update setting description saying it only works with absolute paths. Folks often try relative paths which do not work for them Error: spawn <python interpreter> ENOENT on test discovery when
"python.testing.cwd"
is set #15739 (comment). -
For some reason we need to reload window everytime for changes in the setting to take effect.
-
It seems the setting doesn't work when using forward slashes in windows:
Have the following test./Test/test2.py
where.
is workspace folder
import unittest # The test framework
class Test_TestIncrementDecrement1(unittest.TestCase):
def test_increment(self):
f = open("./demofile.txt", "r")
print(f.read())
self.assertEqual(2, 4)
if __name__ == '__main__':
unittest.main()
And ./demofile.txt
carrying some random content.
Set python.testing.cwd
to ./Test
. Run the file, it doesn't work. Setting python.testing.cwd
to .\\Test
works.