TransactionTestCase.databases discrepancy

I noticed that the docs 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 at the end of the test run. Is this correct? If so, should we change these sentences in the docs?

Funny, I noticed this the other day also. Good spot! Could you take a minute to open a ticket?

1 Like

Will do, thanks so much!

EDIT: Just for future reference, I’ve created ticket #36008.

2 Likes