From a5624af5c9fda6b90fd1422054a8935a3fbc499e Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:06:17 -0400 Subject: [PATCH 1/8] update vscode syntax in readme --- README.md | 84 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index ae9f845..d88ce94 100644 --- a/README.md +++ b/README.md @@ -13,47 +13,51 @@ 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" - } - }, - "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 - } - ] - } - ] - } - ] + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "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", + "${workspaceRoot}" + ], + "problemMatcher": [ + { + "fileLocation": "absolute", + "pattern": [ + { + "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s+(.*)$", + "message": 1 + } + ] + } + ] + } + ] } ``` From bedc58ae4efae5a22a8618d04f6ee7ef19543c7b Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:07:42 -0400 Subject: [PATCH 2/8] update vscode syntax --- .vscode/tasks.json | 183 +++++++++++---------------------------------- 1 file changed, 44 insertions(+), 139 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7e43332..007cbc5 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,140 +1,45 @@ { - // 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" - } - }, - "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" - } - }, - "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}" - ], - "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native -k integration_tests" - } - }, - "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", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ] - } - ] - } - ] -} \ No newline at end of file + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "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", + "${workspaceRoot}" + ], + "problemMatcher": [ + { + "fileLocation": "absolute", + "pattern": [ + { + "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s+(.*)$", + "message": 1 + } + ] + } + ] + } + ] +} From 07230409cfeb53e7ae22c72af48a84b12d027960 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:08:07 -0400 Subject: [PATCH 3/8] fix whitespace --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d88ce94..81a1081 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,9 @@ by other means, e.g. `pytest.ini` file. See [pytest customization options](https }, "type": "shell", "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native" - } + "env": { + "PYTEST_ADDOPTS" : "-vv --tb=native" + } }, "args": [ "-m", From 53c22d9f14096572f333272cf14d085ada943072 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:10:11 -0400 Subject: [PATCH 4/8] Update readme for continuous testing --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 81a1081..e59afee 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,14 @@ by other means, e.g. `pytest.ini` file. See [pytest customization options](https }, "type": "shell", "options": { - "env": { - "PYTEST_ADDOPTS" : "-vv --tb=native" - } + "env": { + "PYTEST_ADDOPTS" : "-vv --tb=native" + } }, "args": [ "-m", - "pytest", + "pytest_watch", + "--runner=${config:python.pythonPath} -m pytest", "${workspaceRoot}" ], "problemMatcher": [ @@ -53,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 } ] } From ea36f015ecc7bdb8f480c8a37c3fd1c315fb9aa0 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:12:21 -0400 Subject: [PATCH 5/8] Make continuous --- .vscode/tasks.json | 93 +++++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 007cbc5..344fb77 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,45 +1,52 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "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", - "${workspaceRoot}" - ], - "problemMatcher": [ - { - "fileLocation": "absolute", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ] - } - ] - } - ] + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "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_watch", + "--runner=${config:python.pythonPath} -m pytest", + "${workspaceRoot}" + ], + "problemMatcher": [ + { + "fileLocation": "absolute", + "pattern": [ + { + "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s+(.*)$", + "message": 1 + } + ], + "background": { + "activeOnStart": false, + "beginsPattern": "^=+ test session starts =+$", + "endsPattern": "^=+ [\\w ]+ in \\d+.\\d\\d seconds =+$" + } + } + ], + "isBackground": true + } + ] } From 9e9393d68fe8313aa0b75f1b262c8c2435cae184 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:12:43 -0400 Subject: [PATCH 6/8] fix spacing --- README.md | 100 +++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index e59afee..cc8e8c8 100644 --- a/README.md +++ b/README.md @@ -15,56 +15,56 @@ by other means, e.g. `pytest.ini` file. See [pytest customization options](https ```json5 { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "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_watch", - "--runner=${config:python.pythonPath} -m pytest", - "${workspaceRoot}" - ], - "problemMatcher": [ - { - "fileLocation": "absolute", - "pattern": [ - { - "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", - "file": 1, - "line": 2 - }, - { - "regexp": "^\\s+(.*)$", - "message": 1 - } - ], - "background": { - "activeOnStart": false, - "beginsPattern": "^=+ test session starts =+$", - "endsPattern": "^=+ [\\w ]+ in \\d+.\\d\\d seconds =+$" - } - } - ], - "isBackground": true - } - ] + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "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_watch", + "--runner=${config:python.pythonPath} -m pytest", + "${workspaceRoot}" + ], + "problemMatcher": [ + { + "fileLocation": "absolute", + "pattern": [ + { + "regexp": "^\\s+File \"(.*)\", line (\\d+), in (.*)$", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s+(.*)$", + "message": 1 + } + ], + "background": { + "activeOnStart": false, + "beginsPattern": "^=+ test session starts =+$", + "endsPattern": "^=+ [\\w ]+ in \\d+.\\d\\d seconds =+$" + } + } + ], + "isBackground": true + } + ] } ``` From a2f39061999191106757e2220bfde48d6901a629 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:33:11 -0400 Subject: [PATCH 7/8] fix endsPattern regex --- .vscode/tasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 344fb77..3951818 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -42,7 +42,7 @@ "background": { "activeOnStart": false, "beginsPattern": "^=+ test session starts =+$", - "endsPattern": "^=+ [\\w ]+ in \\d+.\\d\\d seconds =+$" + "endsPattern": "^=+ [\\w, ]+ in \\d+\\.\\d\\d seconds =+$" } } ], From db1560a5ee76019db72db908d55683b9a0ba3578 Mon Sep 17 00:00:00 2001 From: Scott Miller Date: Mon, 23 Apr 2018 17:33:33 -0400 Subject: [PATCH 8/8] fix endsPattern regex in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc8e8c8..6c90635 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ by other means, e.g. `pytest.ini` file. See [pytest customization options](https "background": { "activeOnStart": false, "beginsPattern": "^=+ test session starts =+$", - "endsPattern": "^=+ [\\w ]+ in \\d+.\\d\\d seconds =+$" + "endsPattern": "^=+ [\\w, ]+ in \\d+\\.\\d\\d seconds =+$" } } ],