<s> """<STR_LIT>""" <EOL> import shutil <EOL> from subprocess import Popen , PIPE , STDOUT <EOL> import tempfile <EOL> import gclient_scm <EOL> from gclient_test import BaseTestCase as GCBaseTestCase <EOL> from super_mox import mox , SuperMoxBaseTestBase <EOL> class BaseTestCase ( GCBaseTestCase ) : <EOL> def setUp ( self ) : <EOL> GCBaseTestCase . setUp ( self ) <EOL> self . mox . StubOutWithMock ( gclient_scm . gclient_utils , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . gclient_utils , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . gclient_utils , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . gclient_utils , '<STR_LIT>' ) <EOL> self . _CaptureSVNInfo = gclient_scm . scm . SVN . CaptureInfo <EOL> self . mox . StubOutWithMock ( gclient_scm . scm . SVN , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . scm . SVN , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . scm . SVN , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . scm . SVN , '<STR_LIT>' ) <EOL> self . mox . StubOutWithMock ( gclient_scm . scm . SVN , '<STR_LIT>' ) <EOL> self . _scm_wrapper = gclient_scm . CreateSCM <EOL> class SVNWrapperTestCase ( BaseTestCase ) : <EOL> class OptionsObject ( object ) : <EOL> def __init__ ( self , test_case , verbose = False , revision = None ) : <EOL> self . verbose = verbose <EOL> self . revision = revision <EOL> self . manually_grab_svn_rev = True <EOL> self . deps_os = None <EOL> self . force = False <EOL> self . nohooks = False <EOL> def Options ( self , * args , ** kwargs ) : <EOL> return self . OptionsObject ( self , * args , ** kwargs ) <EOL> def setUp ( self ) : <EOL> BaseTestCase . setUp ( self ) <EOL> self . root_dir = self . Dir ( ) <EOL> self . args = self . Args ( ) <EOL> self . url = self . Url ( ) <EOL> self . relpath = '<STR_LIT>' <EOL> def testDir ( self ) : <EOL> members = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:status>' , '<STR_LIT>' , '<STR_LIT:url>' , <EOL> ] <EOL> self . compareMembers ( self . _scm_wrapper ( ) , members ) <EOL> def testUnsupportedSCM ( self ) : <EOL> args = [ self . url , self . root_dir , self . relpath ] <EOL> kwargs = { '<STR_LIT>' : '<STR_LIT:foo>' } <EOL> exception_msg = '<STR_LIT>' % kwargs <EOL> self . assertRaisesError ( exception_msg , self . _scm_wrapper , * args , ** kwargs ) <EOL> def testFullUrlForRelativeUrl ( self ) : <EOL> self . url = '<STR_LIT>' <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> self . assertEqual ( scm . FullUrlForRelativeUrl ( '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> def testRunCommandException ( self ) : <EOL> options = self . Options ( verbose = False ) <EOL> file_path = gclient_scm . os . path . join ( self . root_dir , self . relpath , '<STR_LIT>' ) <EOL> gclient_scm . os . path . exists ( file_path ) . AndReturn ( False ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> exception = "<STR_LIT>" % '<STR_LIT:U+002C>' . join ( self . args ) <EOL> self . assertRaisesError ( exception , scm . RunCommand , <EOL> '<STR_LIT>' , options , self . args ) <EOL> def testRunCommandUnknown ( self ) : <EOL> pass <EOL> def testRevertMissing ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> gclient_scm . os . path . isdir ( base_path ) . AndReturn ( False ) <EOL> gclient_scm . os . path . exists ( gclient_scm . os . path . join ( base_path , '<STR_LIT>' ) <EOL> ) . AndReturn ( False ) <EOL> print ( "<STR_LIT>" % self . relpath ) <EOL> gclient_scm . os . path . exists ( base_path ) . AndReturn ( False ) <EOL> files_list = self . mox . CreateMockAnything ( ) <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT>' , self . url , base_path ] , <EOL> self . root_dir , files_list ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> scm . revert ( options , self . args , files_list ) <EOL> def testRevertNone ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> gclient_scm . os . path . isdir ( base_path ) . AndReturn ( True ) <EOL> gclient_scm . scm . SVN . CaptureStatus ( base_path ) . AndReturn ( [ ] ) <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> base_path , mox . IgnoreArg ( ) ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> def testRevert2Files ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> gclient_scm . os . path . isdir ( base_path ) . AndReturn ( True ) <EOL> items = [ <EOL> ( '<STR_LIT>' , '<STR_LIT:a>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT:b>' ) , <EOL> ] <EOL> file_path1 = gclient_scm . os . path . join ( base_path , '<STR_LIT:a>' ) <EOL> file_path2 = gclient_scm . os . path . join ( base_path , '<STR_LIT:b>' ) <EOL> gclient_scm . scm . SVN . CaptureStatus ( base_path ) . AndReturn ( items ) <EOL> gclient_scm . os . path . exists ( file_path1 ) . AndReturn ( True ) <EOL> gclient_scm . os . path . isfile ( file_path1 ) . AndReturn ( True ) <EOL> gclient_scm . os . remove ( file_path1 ) <EOL> gclient_scm . os . path . exists ( file_path2 ) . AndReturn ( True ) <EOL> gclient_scm . os . path . isfile ( file_path2 ) . AndReturn ( True ) <EOL> gclient_scm . os . remove ( file_path2 ) <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> base_path , mox . IgnoreArg ( ) ) <EOL> print ( gclient_scm . os . path . join ( base_path , '<STR_LIT:a>' ) ) <EOL> print ( gclient_scm . os . path . join ( base_path , '<STR_LIT:b>' ) ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> def testRevertDirectory ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> gclient_scm . os . path . isdir ( base_path ) . AndReturn ( True ) <EOL> items = [ <EOL> ( '<STR_LIT>' , '<STR_LIT:a>' ) , <EOL> ] <EOL> gclient_scm . scm . SVN . CaptureStatus ( base_path ) . AndReturn ( items ) <EOL> file_path = gclient_scm . os . path . join ( base_path , '<STR_LIT:a>' ) <EOL> print ( file_path ) <EOL> gclient_scm . os . path . exists ( file_path ) . AndReturn ( True ) <EOL> gclient_scm . os . path . isfile ( file_path ) . AndReturn ( False ) <EOL> gclient_scm . os . path . isdir ( file_path ) . AndReturn ( True ) <EOL> gclient_scm . gclient_utils . RemoveDirectory ( file_path ) <EOL> file_list1 = [ ] <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] , <EOL> base_path , mox . IgnoreArg ( ) ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list2 = [ ] <EOL> scm . revert ( options , self . args , file_list2 ) <EOL> def testStatus ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> gclient_scm . os . path . isdir ( base_path ) . AndReturn ( True ) <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT:status>' ] + self . args , <EOL> base_path , [ ] ) . AndReturn ( None ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> self . assertEqual ( scm . status ( options , self . args , file_list ) , None ) <EOL> def testUpdateCheckout ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> file_info = gclient_scm . gclient_utils . PrintableObject ( ) <EOL> file_info . root = '<STR_LIT>' <EOL> file_info . url = self . url <EOL> file_info . uuid = '<STR_LIT>' <EOL> file_info . revision = <NUM_LIT> <EOL> gclient_scm . os . path . exists ( gclient_scm . os . path . join ( base_path , '<STR_LIT>' ) <EOL> ) . AndReturn ( False ) <EOL> gclient_scm . os . path . exists ( base_path ) . AndReturn ( False ) <EOL> files_list = self . mox . CreateMockAnything ( ) <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( options , <EOL> [ '<STR_LIT>' , self . url , base_path ] , <EOL> self . root_dir , files_list ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> scm . update ( options , ( ) , files_list ) <EOL> def testUpdateUpdate ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> options . force = True <EOL> options . nohooks = False <EOL> file_info = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : self . url , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : <NUM_LIT> , <EOL> } <EOL> gclient_scm . os . path . exists ( gclient_scm . os . path . join ( base_path , '<STR_LIT>' ) <EOL> ) . AndReturn ( False ) <EOL> gclient_scm . os . path . exists ( base_path ) . AndReturn ( True ) <EOL> gclient_scm . scm . SVN . CaptureInfo ( <EOL> gclient_scm . os . path . join ( base_path , "<STR_LIT:.>" ) , '<STR_LIT:.>' <EOL> ) . AndReturn ( file_info ) <EOL> gclient_scm . scm . SVN . CaptureInfo ( file_info [ '<STR_LIT>' ] , '<STR_LIT:.>' ) . AndReturn ( file_info ) <EOL> additional_args = [ ] <EOL> if options . manually_grab_svn_rev : <EOL> additional_args = [ '<STR_LIT>' , str ( file_info [ '<STR_LIT>' ] ) ] <EOL> files_list = [ ] <EOL> gclient_scm . scm . SVN . RunAndGetFileList ( <EOL> options , <EOL> [ '<STR_LIT>' , base_path ] + additional_args , <EOL> self . root_dir , files_list ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> scm . update ( options , ( ) , files_list ) <EOL> def testUpdateGit ( self ) : <EOL> options = self . Options ( verbose = True ) <EOL> file_path = gclient_scm . os . path . join ( self . root_dir , self . relpath , '<STR_LIT>' ) <EOL> gclient_scm . os . path . exists ( file_path ) . AndReturn ( True ) <EOL> print ( "<STR_LIT>" % self . relpath ) <EOL> self . mox . ReplayAll ( ) <EOL> scm = self . _scm_wrapper ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . update ( options , self . args , file_list ) <EOL> class GitWrapperTestCase ( SuperMoxBaseTestBase ) : <EOL> """<STR_LIT>""" <EOL> class OptionsObject ( object ) : <EOL> def __init__ ( self , test_case , verbose = False , revision = None ) : <EOL> self . verbose = verbose <EOL> self . revision = revision <EOL> self . manually_grab_svn_rev = True <EOL> self . deps_os = None <EOL> self . force = False <EOL> self . nohooks = False <EOL> sample_git_import = """<STR_LIT>""" <EOL> def Options ( self , * args , ** kwargs ) : <EOL> return self . OptionsObject ( self , * args , ** kwargs ) <EOL> def CreateGitRepo ( self , git_import , path ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> Popen ( [ '<STR_LIT>' , '<STR_LIT>' ] , stdout = PIPE , stderr = STDOUT , <EOL> cwd = path ) . communicate ( ) <EOL> except OSError : <EOL> return False <EOL> Popen ( [ '<STR_LIT>' , '<STR_LIT>' ] , stdin = PIPE , stdout = PIPE , stderr = STDOUT , <EOL> cwd = path ) . communicate ( input = git_import ) <EOL> Popen ( [ '<STR_LIT>' , '<STR_LIT>' ] , stdout = PIPE , stderr = STDOUT , <EOL> cwd = path ) . communicate ( ) <EOL> return True <EOL> def setUp ( self ) : <EOL> self . args = self . Args ( ) <EOL> self . url = '<STR_LIT>' <EOL> self . root_dir = tempfile . mkdtemp ( ) <EOL> self . relpath = '<STR_LIT:.>' <EOL> self . base_path = gclient_scm . os . path . join ( self . root_dir , self . relpath ) <EOL> self . enabled = self . CreateGitRepo ( self . sample_git_import , self . base_path ) <EOL> SuperMoxBaseTestBase . setUp ( self ) <EOL> def tearDown ( self ) : <EOL> SuperMoxBaseTestBase . tearDown ( self ) <EOL> shutil . rmtree ( self . root_dir ) <EOL> def testDir ( self ) : <EOL> members = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:status>' , '<STR_LIT>' , '<STR_LIT:url>' , <EOL> ] <EOL> self . compareMembers ( gclient_scm . CreateSCM ( url = self . url ) , members ) <EOL> def testRevertMissing ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> file_path = gclient_scm . os . path . join ( self . base_path , '<STR_LIT:a>' ) <EOL> gclient_scm . os . remove ( file_path ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ file_path ] ) <EOL> file_list = [ ] <EOL> scm . diff ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ ] ) <EOL> def testRevertNone ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ ] ) <EOL> self . assertEquals ( scm . revinfo ( options , self . args , None ) , <EOL> '<STR_LIT>' ) <EOL> def testRevertModified ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> file_path = gclient_scm . os . path . join ( self . base_path , '<STR_LIT:a>' ) <EOL> open ( file_path , '<STR_LIT:a>' ) . writelines ( '<STR_LIT>' ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ file_path ] ) <EOL> file_list = [ ] <EOL> scm . diff ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ ] ) <EOL> self . assertEquals ( scm . revinfo ( options , self . args , None ) , <EOL> '<STR_LIT>' ) <EOL> def testRevertNew ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> file_path = gclient_scm . os . path . join ( self . base_path , '<STR_LIT:c>' ) <EOL> f = open ( file_path , '<STR_LIT:w>' ) <EOL> f . writelines ( '<STR_LIT>' ) <EOL> f . close ( ) <EOL> Popen ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:c>' ] , stdout = PIPE , <EOL> stderr = STDOUT , cwd = self . base_path ) . communicate ( ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . revert ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ file_path ] ) <EOL> file_list = [ ] <EOL> scm . diff ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ ] ) <EOL> self . assertEquals ( scm . revinfo ( options , self . args , None ) , <EOL> '<STR_LIT>' ) <EOL> def testStatusNew ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> file_path = gclient_scm . os . path . join ( self . base_path , '<STR_LIT:a>' ) <EOL> open ( file_path , '<STR_LIT:a>' ) . writelines ( '<STR_LIT>' ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . status ( options , self . args , file_list ) <EOL> self . assertEquals ( file_list , [ file_path ] ) <EOL> def testStatus2New ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> expected_file_list = [ ] <EOL> for f in [ '<STR_LIT:a>' , '<STR_LIT:b>' ] : <EOL> file_path = gclient_scm . os . path . join ( self . base_path , f ) <EOL> open ( file_path , '<STR_LIT:a>' ) . writelines ( '<STR_LIT>' ) <EOL> expected_file_list . extend ( [ file_path ] ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . status ( options , self . args , file_list ) <EOL> expected_file_list = [ gclient_scm . os . path . join ( self . base_path , x ) <EOL> for x in [ '<STR_LIT:a>' , '<STR_LIT:b>' ] ] <EOL> self . assertEquals ( sorted ( file_list ) , expected_file_list ) <EOL> def testUpdateCheckout ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( verbose = True ) <EOL> root_dir = tempfile . mkdtemp ( ) <EOL> relpath = '<STR_LIT:foo>' <EOL> base_path = gclient_scm . os . path . join ( root_dir , relpath ) <EOL> url = gclient_scm . os . path . join ( self . root_dir , self . relpath , '<STR_LIT>' ) <EOL> try : <EOL> scm = gclient_scm . CreateSCM ( url = url , root_dir = root_dir , <EOL> relpath = relpath ) <EOL> file_list = [ ] <EOL> scm . update ( options , ( ) , file_list ) <EOL> self . assertEquals ( len ( file_list ) , <NUM_LIT:2> ) <EOL> self . assert_ ( gclient_scm . os . path . isfile ( <EOL> gclient_scm . os . path . join ( base_path , '<STR_LIT:a>' ) ) ) <EOL> self . assertEquals ( scm . revinfo ( options , ( ) , None ) , <EOL> '<STR_LIT>' ) <EOL> finally : <EOL> shutil . rmtree ( root_dir ) <EOL> def testUpdateUpdate ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> expected_file_list = [ gclient_scm . os . path . join ( self . base_path , x ) <EOL> for x in [ '<STR_LIT:a>' , '<STR_LIT:b>' ] ] <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> file_list = [ ] <EOL> scm . update ( options , ( ) , file_list ) <EOL> self . assertEquals ( file_list , expected_file_list ) <EOL> self . assertEquals ( scm . revinfo ( options , ( ) , None ) , <EOL> '<STR_LIT>' ) <EOL> def testRevinfo ( self ) : <EOL> if not self . enabled : <EOL> return <EOL> options = self . Options ( ) <EOL> scm = gclient_scm . CreateSCM ( url = self . url , root_dir = self . root_dir , <EOL> relpath = self . relpath ) <EOL> rev_info = scm . revinfo ( options , ( ) , None ) <EOL> self . assertEquals ( rev_info , '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import unittest <EOL> unittest . main ( ) </s>
