Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 22 additions & 110 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,124 +1,30 @@
{
// 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",
"pytest_watch",
"--runner=${config:python.pythonPath} -m pytest",
"${workspaceRoot}"
],
"options": {
"env": {
"PYTEST_ADDOPTS" : "-vv --tb=native -k system_tests"
}
},
"problemMatcher": [
{
"fileLocation": "absolute",
Expand All @@ -132,9 +38,15 @@
"regexp": "^\\s+(.*)$",
"message": 1
}
]
],
"background": {
"activeOnStart": false,
"beginsPattern": "^=+ test session starts =+$",
"endsPattern": "^=+ [\\w, ]+ in \\d+\\.\\d\\d seconds =+$"
}
}
]
],
"isBackground": true
}
]
}
}
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,32 @@ 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",
"pytest_watch",
"--runner=${config:python.pythonPath} -m pytest",
"${workspaceRoot}"
],
"problemMatcher": [
Expand All @@ -49,9 +54,15 @@ by other means, e.g. `pytest.ini` file. See [pytest customization options](https
"regexp": "^\\s+(.*)$",
"message": 1
}
]
],
"background": {
"activeOnStart": false,
"beginsPattern": "^=+ test session starts =+$",
"endsPattern": "^=+ [\\w, ]+ in \\d+\\.\\d\\d seconds =+$"
}
}
]
],
"isBackground": true
}
]
}
Expand Down