<s> import unittest <EOL> import sys <EOL> import os <EOL> sys . path . append ( os . path . dirname ( __file__ ) + "<STR_LIT>" ) <EOL> simple_cfg = '''<STR_LIT>''' <EOL> class ReplayerTest ( unittest . TestCase ) : <EOL> tmpsuperlog = '<STR_LIT>' <EOL> tmpcfg = '<STR_LIT>' <EOL> tmpcfgpyc = '<STR_LIT>' <EOL> tmpcfgmodule = '<STR_LIT>' <EOL> def write_simple_superlog ( self ) : <EOL> '''<STR_LIT>''' <EOL> superlog = open ( self . tmpsuperlog , '<STR_LIT:w>' ) <EOL> e1 = str ( '''<STR_LIT>''' <EOL> '''<STR_LIT>''' ) <EOL> superlog . write ( e1 + '<STR_LIT:\n>' ) <EOL> e2 = str ( '''<STR_LIT>''' <EOL> '''<STR_LIT>''' ) <EOL> superlog . write ( e2 + '<STR_LIT:\n>' ) <EOL> superlog . close ( ) <EOL> def write_simple_cfg ( self ) : <EOL> cfg = open ( self . tmpcfg , '<STR_LIT:w>' ) <EOL> cfg . write ( simple_cfg % self . tmpsuperlog ) <EOL> cfg . close ( ) <EOL> def basic_test ( self ) : <EOL> try : <EOL> self . write_simple_superlog ( ) <EOL> self . write_simple_cfg ( ) <EOL> ret = os . system ( "<STR_LIT>" % self . tmpcfgmodule ) <EOL> self . assertEqual ( <NUM_LIT:0> , ret ) <EOL> finally : <EOL> os . unlink ( self . tmpsuperlog ) <EOL> os . unlink ( self . tmpcfg ) <EOL> if os . path . exists ( self . tmpcfgpyc ) : <EOL> os . unlink ( self . tmpcfgpyc ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
