#NEWLINE# def test_success( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# shutil . copytree ( os . path . join ( __dir__ , '_Success' ) , os . path . join ( sublime . packages_path ( ) , '_Success' ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# os . unlink ( os . path . join ( outputdir , '_Success' ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# sublime . run_command ( 'unit_testing' , { #NEWLINE# #INDENT# 'package' : '_Success' , #NEWLINE# 'output' : '<file>' , #NEWLINE# #UNINDENT# } ) #NEWLINE# with open ( os . path . join ( outputdir , '_Success' ) , 'r' ) as f : #NEWLINE# #INDENT# txt = f . read ( ) #NEWLINE# #UNINDENT# m = re . search ( '^OK' , m , re . MULTILINE ) #NEWLINE# shutil . rmtree ( os . path . join ( sublime . packages_path ( ) , '_Success' ) ) #NEWLINE# self . assertEqual ( hasattr ( m , 'group' ) , True )