<s> from __future__ import unicode_literals <EOL> import os <EOL> import sys <EOL> import logging <EOL> import django <EOL> try : <EOL> from django . test . runner import DiscoverRunner <EOL> except ImportError : <EOL> from discover_runner import DiscoverRunner <EOL> os . environ [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> def log_warnings ( ) : <EOL> logger = logging . getLogger ( '<STR_LIT>' ) <EOL> handler = logging . StreamHandler ( ) <EOL> logger . addHandler ( handler ) <EOL> def run_tests ( ) : <EOL> test_runner = DiscoverRunner ( ) <EOL> failures = test_runner . run_tests ( [ "<STR_LIT>" , ] ) <EOL> sys . exit ( failures ) <EOL> def start ( ) : <EOL> django . setup ( ) <EOL> log_warnings ( ) <EOL> run_tests ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> start ( ) </s>
