Skip to content

Change default current working directory in "request": "test" debug configuration #7204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
karrtikr opened this issue Sep 4, 2019 · 1 comment
Labels
area-testing feature-request Request for new features or functionality

Comments

@karrtikr
Copy link

karrtikr commented Sep 4, 2019

Currently, the default value of cwd is ${workspaceFolder}, so we assume the tests are being debugged from ${workspaceFolder}.

We should set cwd by default pointing it to directory set by test configuration instead. For example for unittest framework with configuration

    "python.testing.unittestArgs": [
        "-v",
        "-s",
        "./Tests",
        "-p",
        "*test_*.py"
    ],
    "python.testing.pytestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.unittestEnabled": true

We should set "cwd" as "${workspaceFolder}/Tests" instead of "${workspaceFolder}. It helps avoid issues like #7176 (comment) where tests assume they are being run from "${workspaceFolder}/Tests" directory.

Originally posted by @karrtikr in #7176 (comment)

@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Sep 4, 2019
@karrtikr karrtikr added area-testing needs decision feature-request Request for new features or functionality labels Sep 4, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Sep 4, 2019
@luabud
Copy link
Member

luabud commented Nov 1, 2019

Closing in favour of #8339.

@luabud luabud closed this as completed Nov 1, 2019
@ghost ghost removed the needs decision label Nov 1, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants