<s> import sys <EOL> from os . path import abspath , dirname , join as path_join <EOL> from unittest import TestLoader , TextTestRunner <EOL> directory = dirname ( __file__ ) <EOL> path = path_join ( abspath ( path_join ( directory , '<STR_LIT:..>' , '<STR_LIT:..>' , '<STR_LIT:src>' ) ) ) <EOL> sys . path . insert ( <NUM_LIT:1> , path ) <EOL> try : <EOL> import mock <EOL> except ImportError : <EOL> raise ImportError ( '<STR_LIT>' ) <EOL> if len ( sys . argv ) > <NUM_LIT:1> and '<STR_LIT>' in sys . argv [ <NUM_LIT:1> ] : <EOL> verbosity = int ( sys . argv [ <NUM_LIT:1> ] . split ( '<STR_LIT:=>' ) [ <NUM_LIT:1> ] ) <EOL> else : <EOL> verbosity = <NUM_LIT:1> <EOL> sys . exit ( not TextTestRunner ( verbosity = verbosity ) . run ( TestLoader ( ) . discover ( directory ) ) . wasSuccessful ( ) ) </s>
