diff --git a/.vscode/launch.json b/.vscode/launch.json index f03b4b177..2708f71c0 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,17 +3,15 @@ // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", - "configurations": [ + "configurations": [ { "name": "DJL RunServer", - "type": "python", + "type": "debugpy", "request": "launch", "program": "${workspaceFolder}/manage.py", - "args": [ - "runserver" - ], + "args": ["runserver"], "django": true, "justMyCode": true } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..82594303a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "python.testing.unittestArgs": [ + "--settings", + "dev_env.settings", + "--pattern", + "test_*.py" + ], + "python.testing.pytestEnabled": false, + "python.testing.unittestEnabled": true, + "python.envFile": "${workspaceFolder}/dev_env/.env" +} diff --git a/README.md b/README.md index eaf53a7c0..538151e07 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,14 @@ After setting up your development environment you may run tests. python manage.py test django_ledger ``` +## Running tests inside Visual Studio Core +If you want to run tests inside Visual Studio Core you will need to create an `.env` file inside `dev_env` with the following content: + +``` +MANAGE_PY_PATH=./manage.py +DJANGO_SETTINGS_MODULE=dev_env.settings +``` + # Screenshots ![django ledger entity dashboard](https://us-east-1.linodeobjects.com/django-ledger/public/img/django_ledger_entity_dashboard.png)