You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default implementation of SimpleTestCase disables database queries per default, which is why I'm thinking that migrating the database could conditionally happen depending on the value of SimpleTestCase.databases?
SimpleTestCase disallows database queries by default. This helps to avoid executing write queries which will affect other tests since each SimpleTestCase test isn’t run in a transaction. If you aren’t concerned about this problem, you can disable this behavior by setting the databases class attribute to 'all' on your test class.
I'm having the same issue. It will be great to have this fixed because sometimes the difference in testing times between pytest and django tests are big because of this (i.e: django tests take 80s to finish and pytest tests take 145s)
The default implementation of
SimpleTestCase
disables database queries per default, which is why I'm thinking that migrating the database could conditionally happen depending on the value ofSimpleTestCase.databases
?Ref: https://docs.djangoproject.com/en/4.1/topics/testing/tools/#django.test.SimpleTestCase.databases
The text was updated successfully, but these errors were encountered: