Skip to content

Commit 2ab0d47

Browse files
authored
Merge pull request #54 from satyam-seth-learnings/setup-vs-code-test-runner
Setup vs code test runner
2 parents c681561 + 9fb5a78 commit 2ab0d47

File tree

3 files changed

+32
-17
lines changed

3 files changed

+32
-17
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MANAGE_PY_PATH=manage.py

.vscode/setting.json

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
2-
"editor.formatOnSave": true,
3-
"editor.codeActionsOnSave": {
4-
"source.fixAll": "explicit",
5-
"source.organizeImports": "explicit"
6-
},
7-
"editor.rulers": [
8-
100
9-
],
10-
"[python]": {
11-
"editor.defaultFormatter": "ms-python.black-formatter"
12-
},
13-
"isort.args":[
14-
"--profile",
15-
"black",
16-
"--skip-glob",
17-
"*/migrations/*"
18-
]
2+
"editor.formatOnSave": true,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll": "explicit",
5+
"source.organizeImports": "explicit"
6+
},
7+
"editor.rulers": [100],
8+
"[python]": {
9+
"editor.defaultFormatter": "ms-python.black-formatter"
10+
},
11+
"isort.args": ["--profile", "black", "--skip-glob", "*/migrations/*"],
12+
"python.testing.unittestEnabled": true,
13+
"python.testing.pytestEnabled": false,
14+
"python.testing.unittestArgs": ["-p", "*test*.py"]
1915
}

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,3 +1087,21 @@ python3 manage.py test
10871087
```sh
10881088
copy .githooks\pre-push .git\hooks\pre-push
10891089
```
1090+
1091+
15. Setup VS Code test runner
1092+
1093+
- Add manage.py path variable in `.env` file
1094+
1095+
```env
1096+
MANAGE_PY_PATH=manage.py
1097+
```
1098+
1099+
- Configure VS Code to for test runner in `.vscode/settings.json`
1100+
1101+
```json
1102+
{
1103+
"python.testing.unittestEnabled": true,
1104+
"python.testing.pytestEnabled": false,
1105+
"python.testing.unittestArgs": ["-p", "*test*.py"]
1106+
}
1107+
```

0 commit comments

Comments
 (0)