Why django SimpleTestCase creates a test database

as described in this and in django docs when using SimpleTestCase in unit testing, django should not create a test database (which takes too much time).

In one of my applications called search, I have several unit tests inherited from SimpleTestCase. This is test.py inside the search application:

class TokenizerTestCase(SimpleTestCase):
    def test_one(self):
        self.assertItemsEqual(1, 1)

When I call python manage.py test search.tests.TokenizerTestCase, it takes too much time to create the default database. Does anyone know why it creates a database for testing?

+4
source share
1

SimpleTestCase . . , , .

_pre_setup _post_teardown. TransactionTestCase, , .

+1

All Articles