forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Refs: 23279
- macOS @aiday-mar
- linux @joshspicer
- windows @karthiknadig
Complexity: 5
Author: @eleanorjboyd
-
Setup:
- Clone the test repo from here or use your own repo of pytests.
- Launch VSCode and open the
python-ext-tester/python-testing/inc-dec-workspacefolder. - Add the following to your settings in VSCode:
"python.experiments.optInto": ["pythonTestAdapter"], - Use the "create environment" command from the command palette, select
venvand a Python version >=3.7. - click the test explorer icon (beaker)
- configure tests
- unittest: unittest → root →
*test*.py
- unittest: unittest → root →
-
Testing:
- Now play around with running the tests attempting to put "strain" on the testing flow to make sure it works as anticipated
- Ideas of what to do include:
- Run large number of tests and make sure it finishes successfully (see the subtests or the parameterized tests which should have 2000 tests that can be run)
- stop tests and restart them (NOTE: there is a know problem where if you restart a test 3 times during debugging it will freeze the window, see issue please comment on the issue if you hit something similar and your repro steps)
- debug tests, put break-points on and generally just start, restart, and stop tests in debug mode
- throw an error in a test or spin up a subprocess as part of a test