diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7e43332..f06b797 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,124 +1,29 @@ { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "python", - "echoCommand": true, - "suppressTaskName": true, - "isShellCommand": true, - "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native" - } - }, + "version": "2.0.0", "tasks": [ { - "taskName": "tests", - "isTestCommand": true, - "args": [ - "-m", - "pytest", - "${workspaceRoot}" - ], - "problemMatcher": [ - { - "fileLocation": "absolute", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ] - } - ] - }, - { - "taskName": "unit_tests", - "isTestCommand": true, - "command": "python", - "echoCommand": true, - "isShellCommand": true, - "args": [ - "-m", - "pytest", - "${workspaceRoot}" - ], - "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native -k unit_tests" - } + "command": "${config:python.pythonPath}", + "label": "tests", + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared" }, - "problemMatcher": [ - { - "fileLocation": "absolute", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ] - } - ] - }, - { - "taskName": "integration_tests", - "isTestCommand": true, - "command": "python", - "echoCommand": true, - "isShellCommand": true, - "args": [ - "-m", - "pytest", - "${workspaceRoot}" - ], + "type": "shell", "options": { "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native -k integration_tests" + "PYTEST_ADDOPTS": "-vv --tb=native" } }, - "problemMatcher": [ - { - "fileLocation": "absolute", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ] - } - ] - }, - { - "taskName": "system_tests", - "isTestCommand": true, - "command": "python", - "echoCommand": true, - "isShellCommand": true, "args": [ "-m", "pytest", "${workspaceRoot}" ], - "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native -k system_tests" - } - }, "problemMatcher": [ { "fileLocation": "absolute", @@ -137,4 +42,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/README.md b/README.md index ae9f845..6a88ca9 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,28 @@ of the assert in the file. We also need to use `pytest` option `--tb=native` to get the default traceback. You can of course add extra options by other means, e.g. `pytest.ini` file. See [pytest customization options](https://docs.pytest.org/en/latest/customize.html) -```json +```json5 { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "python", - "echoCommand": true, - "suppressTaskName": true, - "isShellCommand": true, - "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native" - } - }, + "version": "2.0.0", "tasks": [ { - "taskName": "tests", - "isTestCommand": true, + "command": "${config:python.pythonPath}", + "label": "tests", + "group": "test", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared" + }, + "type": "shell", + "options": { + "env": { + "PYTEST_ADDOPTS": "-vv --tb=native" + } + }, "args": [ "-m", "pytest",