Coder Social home page Coder Social logo

Comments (5)

kondratyev-nv avatar kondratyev-nv commented on June 15, 2024

@LeonOnRoad Thank you for the issue! Can you tell me what is specified in your configuration? Also, it looks like this is more about escaping is Python script

return get_tests(loader.discover("${configuration.startDirectory}", pattern="${configuration.pattern}"))

Strings should be treated as raw literals.

from vscode-python-test-adapter.

kondratyev-nv avatar kondratyev-nv commented on June 15, 2024

@LeonOnRoad This issue should be fixed in version 0.3.1. Please, update the extension and let me know if the issue persists.

from vscode-python-test-adapter.

LeonOnRoad avatar LeonOnRoad commented on June 15, 2024

With version 0.3.1 it works fine. Thanks for fixing this!

I couldn't find 'configuration.startDirectory' in any of my configuration, settings or launch json files.
Currently my configuration is Python Current File (Integrated Terminal) (back-end)

Extract from launch.json containing the configuration

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        },
...
}

image

from vscode-python-test-adapter.

kondratyev-nv avatar kondratyev-nv commented on June 15, 2024

I was talking about the unittest argument -s that can be provided in python.unitTest.unittestArgs configuration property in the settings.json file. By default . (current folder) is used.

from vscode-python-test-adapter.

LeonOnRoad avatar LeonOnRoad commented on June 15, 2024

Ok, thanks for clearing that up for me.
Here is my configuration:

"python.unitTest.unittestArgs": [
        "-v",
        "-s", "./tests",
        "-p", "*test*.py"
    ]

This works fine with the python extension when discovering and running tests.

from vscode-python-test-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.