Skip to content

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

Closed as not planned

Description

@karrtikr

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

  1. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on May 7, 2020
  2. eleanorjboyd commented on Dec 20, 2023

    @eleanorjboyd

    Karthik Nadig (@karthiknadig) and Kartik Raj (@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?

  3. karthiknadig commented on Jan 2, 2024

    @karthiknadig
    Member

    Eleanor Boyd (@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.

  4. eleanorjboyd commented on Jul 8, 2025

    @eleanorjboyd

    closing as stale

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

Metadata

Metadata

Labels

area-testingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions