mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +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:
parent
8c775391b7
commit
41e73de39d
8 changed files with 115 additions and 13 deletions
0
tests/test_runner_apps/databases/__init__.py
Normal file
0
tests/test_runner_apps/databases/__init__.py
Normal file
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__'
|
Loading…
Add table
Add a link
Reference in a new issue