Opened 6 years ago
Closed 6 years ago
#29866 closed Bug (fixed)
Database teardown doesn't run if a check errors when running tests
Reported by: | Jayden Kneller | Owned by: | Jayden Kneller |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | run_checks tests teardown database test environment |
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
When running tests locally where the run_checks (new in 1.11) call fails the test database does not get torn down.
If you run the tests again you then need to type 'yes' to tear down the old database before it can continue.
Have the patch and a test created.
Change History (9)
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:2 by , 6 years ago
Patch needs improvement: | set |
---|---|
Summary: | Teardown doesn't run if a check errors when running tests. → Database teardown doesn't run if a check errors when running tests |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:3 by , 6 years ago
Patch needs improvement: | unset |
---|
comment:4 by , 6 years ago
This can be reviewed again. I unchecked the Patch needs improvement checkbox as instructed.
comment:5 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Looks good minus the minor naming tweaks.
comment:6 by , 6 years ago
Just committed your test class name, comment, and doc string changes.
The reason for the class name was because I saw "Ticket17477RegressionTests" in the same tests file and thought that was the way to do tickets.
I read through a few pages on the site before doing anything but I'm not sure I saw anything about naming or wording. I did see the past tense commit messages. Maybe a little wording/naming guideline would help. Perhaps somewhere near this section on this page: https://docs.djangoproject.com/en/2.1/internals/contributing/committing-code/#committing-guidelines
comment:7 by , 6 years ago
Or perhaps on this page: https://docs.djangoproject.com/en/2.1/internals/contributing/writing-code/submitting-patches/
comment:8 by , 6 years ago
It was pointed out to me by someone here that there is a line about docstrings which mentions what you said on this page: https://docs.djangoproject.com/en/2.1/internals/contributing/writing-code/coding-style/
I didn't realize it would be part of that page and missed reading it.
PR (with comments for improvement). Please uncheck "Patch needs improvement" when it's ready for review again.