forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Refs: #73
- macOS @lszomoru
- linux @deepak1556
- windows @joyceerhl
Complexity: 5
Author: @eleanorjboyd
We have now added support so Django tests show up in the test explorer! I have listed the steps below and am looking for both feedback / bugs on the actual Django testing and also the doc we have written up to help users. As a note this is not our final/ desired UI to have this set and get configured. We plan on making this much more user friends once the work with custom configs is decided on but didn't want Django testing to be blocked till then.
Steps:
- create a python virtual environment (us the create environment command from the command palette)
- create a Django project (you can see how on their website or maybe copilot could generate it for you)
- write a test in your Django project
- make sure you tests runs from the command line. It should look something like this
python manage.py test(may need to specify manage.py path more depending on cwd) - once you can get the tests running from the command line, try it in the UI!
- follow the steps in this PR and verify that you can get your tests discovered and run via the test explorer tab
(a known issue that you might face is having to reload the vscode window after selecting unittest to activate that runner as it might default to pytest which would then error for test discovery)