<s> import os <EOL> import sys <EOL> import django <EOL> from django . conf import settings <EOL> def delete_migrations ( ) : <EOL> from os . path import exists , abspath , dirname , join <EOL> migrations_dir = join ( <EOL> dirname ( abspath ( __file__ ) ) , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> if exists ( migrations_dir ) : <EOL> os . system ( '<STR_LIT>' + migrations_dir ) <EOL> def main ( ) : <EOL> import warnings <EOL> warnings . filterwarnings ( '<STR_LIT:error>' , category = DeprecationWarning ) <EOL> delete_migrations ( ) <EOL> if not settings . configured : <EOL> settings . configure ( <EOL> INSTALLED_APPS = [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] , <EOL> DATABASE_ENGINE = '<STR_LIT>' , <EOL> DATABASES = { <EOL> '<STR_LIT:default>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> } , <EOL> MEDIA_ROOT = '<STR_LIT>' , <EOL> MEDIA_PATH = '<STR_LIT>' , <EOL> ROOT_URLCONF = '<STR_LIT>' , <EOL> DEBUG = True , <EOL> TEMPLATE_DEBUG = True , <EOL> ) <EOL> if hasattr ( django , '<STR_LIT>' ) : <EOL> django . setup ( ) <EOL> from django . test . utils import get_runner <EOL> test_runner = get_runner ( settings ) ( verbosity = <NUM_LIT:2> , interactive = True ) <EOL> if '<STR_LIT>' in sys . argv : <EOL> test_runner . failfast = True <EOL> failures = test_runner . run_tests ( [ '<STR_LIT>' ] ) <EOL> delete_migrations ( ) <EOL> sys . exit ( failures ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
