Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

debugging pytest in vscode

# launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Debug Tests",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "purpose": ["debug-test"],
            "console": "integratedTerminal",
            "justMyCode": false
        },
    ]
}
# settings.json
{
    "python.testing.pytestArgs": [
        "--override-ini",
        "addopts=--verbose -vv tests" # <-- this is the directory containing tests.
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true,
    "python.pythonPath": "/usr/bin/python" # <-- this is you python env with pytest
}
Comment

enable pytest vscode

{
    "python.pythonPath": "/usr/local/bin/python3", // <--- path to interpreter
    "python.testing.pytestArgs": [
        ""   <-- Search path for the tests , blank would be root 
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true
}
Comment

PREVIOUS NEXT
Code Example
Python :: pandas has no attribute scatter_matrix 
Python :: order pandas dataframe by column values 
Python :: find root directory of jupyter notebook 
Python :: python install package from code 
Python :: django gmail smtp 
Python :: python system arguments 
Python :: python random.choices vs random.sample 
Python :: find duplicated rows with respect to multiple columns pandas 
Python :: django runserver 
Python :: get sheet names using pandas 
Python :: how to do pandas profiling 
Python :: current year in python 
Python :: version of scikit learn 
Python :: easiest way to position labels in tkinter 
Python :: pydrive list folders 
Python :: discord.py send image 
Python :: upgrade package python 
Python :: django foreign key field on delete do nothing 
Python :: python datetime yesterday 
Python :: polynomial fit in python 
Python :: selenium scroll element into view inside overflow python 
Python :: flask development mode 
Python :: remove base from terminal anaconda 
Python :: change dataframe column type 
Python :: django admin slug auto populate 
Python :: calculate mape python 
Python :: virtualenv with specific python version 
Python :: load diamonds dataset from sns 
Python :: tkinter execute function on enter 
Python :: django serializer exclude fields 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =