Skip to content

python.testing.cwd does not work properly #11669

Closed
@karrtikr

Description

@karrtikr
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testingbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions