Commit 57d8b49
committed
test: configure pytest for VS Code
This will allow developers using VS Code to automatically detect, run,
and deubg their tests using VS Code's Testing bar. To do this, we're
explicitly passing --ds=test_settings to point pytest-django at the
correct settings.
Note that creating a pytest.ini file and adding DJANGO_SETTINGS_MODULE
to it won't work for most developers who will be running these tests
under Tutor. That's because Tutor will set the environment variable
DJANGO_SETTINGS_MODULE for LMS or Studio (CMS), and this takes
precedence over pytest.ini.
This commit also starts a pattern for allow-listing specific
configuration files in the .vscode directory. This is going to be a
balancing act where we want to add just a few things that should be
universally shared for convenience, like how to run tests or attach
debugging to a running process. While VS Code does store user-specific
settings elsewhere, individual developers may be running many plugins
that put their own data in this directory.1 parent 2644032 commit 57d8b49
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments