-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable test running and debugging in VS Code
Enable test running and debugging through VS Code, using pytest. Also remove Django Debug Toolbar because it was causing issues when running the tests through VS Code, and I haven't really used it since I added it.
- Loading branch information
Showing
7 changed files
with
70 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,6 @@ | |
"args": ["runserver"], | ||
"django": true, | ||
"justMyCode": true | ||
} | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"editor.tabSize": 4, | ||
"editor.insertSpaces": true | ||
"editor.insertSpaces": true, | ||
"python.testing.pytestEnabled": true, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pytest] | ||
DJANGO_SETTINGS_MODULE=rorapp.settings | ||
python_files=*tests.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
from django.urls import path, include | ||
from django.contrib import admin | ||
from django.conf import settings | ||
|
||
urlpatterns = [ | ||
path('', include('rorapp.urls')), | ||
path('admin/', admin.site.urls) | ||
] | ||
|
||
if settings.DEBUG: | ||
import debug_toolbar | ||
urlpatterns = [ | ||
path('__debug__/', include(debug_toolbar.urls)), | ||
] + urlpatterns | ||
urlpatterns = [path("", include("rorapp.urls")), path("admin/", admin.site.urls)] |