<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> BASE_DIR = os . path . dirname ( __file__ ) <EOL> def run_tests ( apps = None , verbosity = <NUM_LIT:1> , interactive = False ) : <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( BASE_DIR , '<STR_LIT:src>' ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( BASE_DIR , '<STR_LIT>' ) ) <EOL> import django <EOL> if django . VERSION >= ( <NUM_LIT:1> , <NUM_LIT:7> ) : <EOL> django . setup ( ) <EOL> from django . conf import settings <EOL> from django . test . utils import get_runner <EOL> TestRunner = get_runner ( settings ) <EOL> test_runner = TestRunner ( <EOL> verbosity = verbosity , <EOL> interactive = interactive , <EOL> failfast = False <EOL> ) <EOL> if apps : <EOL> app_tests = [ x . strip ( ) for x in apps if x ] <EOL> else : <EOL> app_tests = [ '<STR_LIT>' ] <EOL> failures = test_runner . run_tests ( app_tests ) <EOL> sys . exit ( bool ( failures ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> run_tests ( apps = sys . argv [ <NUM_LIT:1> : ] ) </s>
