Skip to content

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

Closed

Description

@karrtikr

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 Kartik Raj (@karrtikr) in #7176 (comment)

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Sep 4, 2019
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Sep 4, 2019
  3. luabud commented on Nov 1, 2019

    @luabud
    Member

    Closing in favour of #8339.

  4. locked as resolved and limited conversation to collaborators on Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions