#33906: TestCase inconsistent behavior on Db integrity error
-------------------------------------+-------------------------------------
Reporter: an-mile | Owner: nobody
Type: Bug | Status: closed
Component: Testing framework | Version: 4.0
Severity: Normal | Resolution: invalid
Keywords: testsuite | Triage Stage:
integrityError bug inconsistent | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by an-mile):
Ok I took a further look at the issue: the posted traceback shows that we
enter and execute `_post_teardown()` in "django/test/testcases.py", line
299, `_setup_and_call`
So it seems what is happening is the following :
* At least in the **SQLite** case, the `bulk_create` is executed
completely, hence creating inconsistent data in the DB.
* The `_tear_down` runs some DB integrity check and prints a corresponding
exception...
Does this make sense?
So I am not so sure anymore if it's a bug or an undocumented feature or
so, but it's still confusing...
What also probably created additional confusion is that in the PG case, it
did not insert data into DB creating a slightly different situation.
--
Ticket URL: <https://code.djangoproject.com/ticket/33906#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701827cf06d0e-157b0f17-4656-4cb2-808d-d5ab3fd24e86-000000%40eu-central-1.amazonses.com.