#30676 closed New feature (fixed)
Add a --pdb option to the test runner
| Reported by: | Andrew Godwin | Owned by: | Andrew Godwin |
|---|---|---|---|
| Component: | Testing framework | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The Django test runner currently does not offer a --pdb option like pytest (which, when a test fails, pops open a PDB debugger at that location). This would be incredibly valuable for debugging tests, and I feel we should add it.
Because of the multi-process nature of the test runner, this would only be possible if we were running with --parallel=1.
Change History (14)
comment:1 by , 6 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|---|
| Type: | Uncategorized → New feature |
comment:2 by , 6 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:4 by , 6 years ago
| Has patch: | set |
|---|
comment:5 by , 6 years ago
| Needs documentation: | set |
|---|
comment:6 by , 6 years ago
| Needs documentation: | unset |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
comment:7 by , 6 years ago
This is great.
...this would only be possible if we were running with
--parallel=1.
As per my comment on the PR, if I pass --pdb could --parallel=1 be implied? (I always want that right?)
comment:9 by , 6 years ago
OK. (We can always come back if people decide they want that.). Good work.
We should probably make the option default to
ipdbif it's installed like we do withmanage.py shellfor IPython.