Skip to content

Backslashes doesn't work when specifying the paths with python.testing.unittestArgs #11670

Open
@karrtikr

Description

The following discovers the tests,

  "python.testing.unittestArgs": [
    "-v",
    "-s",
    "C:/Users/karraj/Desktop/Desktop/test_demo/src",
    "-p",
    "*test*.py"
  ],

whereas

  "python.testing.unittestArgs": [
    "-v",
    "-s",
    "C:\\Users\\karraj\\Desktop\\Desktop\\test_demo\\src",
    "-p",
    "*test*.py"
  ],

doesn't.

Activity

ghost removed
triage-neededNeeds assignment to the proper sub-team
on May 7, 2020
self-assigned this
on Dec 4, 2023
eleanorjboyd

eleanorjboyd commented on Dec 20, 2023

@eleanorjboyd
Member

@karthiknadig and @karrtikr, thinking one of you could help here. Is the issue that this file path formatting is not supported and on windows it should be supported? What is the step to fix this here, do I have to pass the paths as different types of evaluate them before sending them to pytest?

karthiknadig

karthiknadig commented on Jan 2, 2024

@karthiknadig
Member

@eleanorjboyd This might just be a case of using pathlib to process the path and generate the string that works for unittest. We can talk about this in more detail when you work on this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

area-testingbugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Backslashes doesn't work when specifying the paths with `python.testing.unittestArgs` · Issue #11670 · microsoft/vscode-python