<s> from test_utils . crawler import signals as test_signals <EOL> class Plugin ( object ) : <EOL> """<STR_LIT>""" <EOL> global_data = { } <EOL> def __init__ ( self ) : <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> test_signals . pre_request . connect ( self . pre_request ) <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> test_signals . post_request . connect ( self . post_request ) <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> test_signals . start_run . connect ( self . start_run ) <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> test_signals . finish_run . connect ( self . finish_run ) <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> test_signals . urls_parsed . connect ( self . urls_parsed ) <EOL> self . data = self . global_data [ self . __class__ . __name__ ] = { } <EOL> self . output_dir = None <EOL> """<STR_LIT>""" <EOL> def set_output_dir ( self , output_dir ) : <EOL> """<STR_LIT>""" <EOL> self . output_dir = output_dir </s>
