[Django] #29866: Teardown doesn't run if a check errors when running tests.

9 views
Skip to first unread message

Django

unread,
Oct 18, 2018, 6:24:59 PM10/18/18
to django-...@googlegroups.com
#29866: Teardown doesn't run if a check errors when running tests.
-------------------------------------+-------------------------------------
Reporter: Jayden | Owner: nobody
Kneller |
Type: | Status: assigned
Uncategorized |
Component: Testing | Version: master
framework | Keywords: run_checks tests
Severity: Normal | teardown database test environment
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29866>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 18, 2018, 6:25:09 PM10/18/18
to django-...@googlegroups.com
#29866: Teardown doesn't run if a check errors when running tests.
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Uncategorized | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage:
teardown database test | Unreviewed
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jayden Kneller):

* owner: nobody => Jayden Kneller


--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:1>

Django

unread,
Oct 18, 2018, 8:15:49 PM10/18/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests

-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Accepted
teardown database test |
environment |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* type: Uncategorized => Bug


Comment:

[https://github.com/django/django/pull/10528 PR] (with comments for
improvement). Please uncheck "Patch needs improvement" when it's ready for
review again.

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:2>

Django

unread,
Oct 19, 2018, 2:30:24 PM10/19/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Accepted
teardown database test |
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jayden Kneller):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:3>

Django

unread,
Oct 29, 2018, 1:04:27 PM10/29/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Accepted
teardown database test |
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jayden Kneller):

This can be reviewed again. I unchecked the Patch needs improvement
checkbox as instructed.

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:4>

Django

unread,
Oct 29, 2018, 5:18:11 PM10/29/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Ready for
teardown database test | checkin
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* stage: Accepted => Ready for checkin


Comment:

Looks good minus the minor naming tweaks.

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:5>

Django

unread,
Oct 29, 2018, 6:10:03 PM10/29/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Ready for
teardown database test | checkin
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jayden Kneller):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:6>

Django

unread,
Oct 29, 2018, 6:13:40 PM10/29/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Ready for
teardown database test | checkin
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jayden Kneller):

Or perhaps on this page:
https://docs.djangoproject.com/en/2.1/internals/contributing/writing-code
/submitting-patches/

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:7>

Django

unread,
Oct 29, 2018, 6:28:35 PM10/29/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: run_checks tests | Triage Stage: Ready for
teardown database test | checkin
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jayden Kneller):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:8>

Django

unread,
Oct 30, 2018, 12:23:28 PM10/30/18
to django-...@googlegroups.com
#29866: Database teardown doesn't run if a check errors when running tests
-------------------------------------+-------------------------------------
Reporter: Jayden Kneller | Owner: Jayden
| Kneller
Type: Bug | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: run_checks tests | Triage Stage: Ready for
teardown database test | checkin
environment |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"916aecd29d5e3c5e02b620fbd38eac6d61ce6a5d" 916aecd]:
{{{
#!CommitTicketReference repository=""
revision="916aecd29d5e3c5e02b620fbd38eac6d61ce6a5d"
Fixed #29866 -- Made DiscoverRunner do tests tear down if running checks
or tests raises an exception.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29866#comment:9>

Reply all
Reply to author
Forward
0 new messages