import os
from django.conf import settings
from django.db import connections
from django.test import SimpleTestCase
if not settings.configured:
    settings.configure(
        DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'},
                   'other': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}},
        INSTALLED_APPS=[],
    )
class BuggyTest(SimpleTestCase):
    databases = {'default'}
def reproduce():
    BuggyTest.setUpClass()
    print("First cleanup...")
    BuggyTest._remove_databases_failures()
    print("Second cleanup (should crash without fix)...")
    BuggyTest._remove_databases_failures()
if __name__ == "__main__":
    reproduce()