mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #28478 -- Make DiscoverRunner skip creating unused test databases.
SimpleTestCase.databases makes it possible to determine the set of databases required to run the discovered tests.
This commit is contained in:
committed by
Tim Graham
parent
8c775391b7
commit
41e73de39d
18
tests/test_runner_apps/databases/tests.py
Normal file
18
tests/test_runner_apps/databases/tests.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import unittest
|
||||
|
||||
|
||||
class NoDatabaseTests(unittest.TestCase):
|
||||
def test_nothing(self):
|
||||
pass
|
||||
|
||||
|
||||
class DefaultDatabaseTests(NoDatabaseTests):
|
||||
databases = {'default'}
|
||||
|
||||
|
||||
class OtherDatabaseTests(NoDatabaseTests):
|
||||
databases = {'other'}
|
||||
|
||||
|
||||
class AllDatabasesTests(NoDatabaseTests):
|
||||
databases = '__all__'
|
||||
Reference in New Issue
Block a user