#36008: TransactionTestCase.databases discrepancy
-------------------------------------+-------------------------------------
     Reporter:  Sviatoslav Abakumov  |                     Type:  Bug
       Status:  new                  |                Component:
                                     |  Documentation
      Version:  5.1                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 The docs on
 
[https://docs.djangoproject.com/en/5.1/topics/testing/tools/#django.test.TransactionTestCase.databases
 django.test.TransactionTestCase.databases] mention that Django flushes the
 test DB at the start of the test run (emphasis mine):

 > However, a big part of the time taken to run a Django `TestCase` is
 consumed by the call to `flush` that ensures that you have a clean
 database **at the start** of each test run.

 > As an optimization, Django only flushes the `default` database **at the
 start** of each test run.

 However, after tracing the code, I believe that Django flushes the DB
 
[https://github.com/django/django/blob/stable/5.1.x/django/test/testcases.py#L1236-L1244
 at the end] of the test run.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36008>
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 visit 
https://groups.google.com/d/msgid/django-updates/01070193bef5225b-f4ea8603-58eb-454f-89b2-ff88cbb23845-000000%40eu-central-1.amazonses.com.

Reply via email to