#NEWLINE# def test_repo_svn( self ) : #NEWLINE# #INDENT# repo_dir = os . path . join ( self . TMP_DIR , '.repo_dir' ) #NEWLINE# repo_name = 'my_svn_project' #NEWLINE# svn_repo = create_repo ( ** { #NEWLINE# #INDENT# 'url' : ( 'svn+file://' + os . path . join ( repo_dir , repo_name ) ) , #NEWLINE# 'cwd' : self . TMP_DIR , #NEWLINE# 'name' : repo_name , #NEWLINE# #UNINDENT# } ) #NEWLINE# svn_checkout_dest = os . path . join ( self . TMP_DIR , svn_repo [ 'name' ] ) #NEWLINE# os . mkdir ( repo_dir ) #NEWLINE# run ( [ 'svnadmin' , 'create' , svn_repo [ 'name' ] ] , cwd = repo_dir ) #NEWLINE# svn_repo . obtain ( ) #NEWLINE# self . assertTrue ( os . path . exists ( svn_checkout_dest ) ) #NEWLINE# tempFile = tempfile . NamedTemporaryFile ( dir = svn_checkout_dest ) #NEWLINE# run ( [ 'svn' , 'add' , '--non-interactive' , tempFile . name ] , cwd = svn_checkout_dest ) #NEWLINE# run ( [ 'svn' , 'commit' , '-m' , ( 'a test file for %s' % svn_repo [ 'name' ] ) ] , cwd = svn_checkout_dest ) #NEWLINE# self . assertEqual ( svn_repo . get_revision ( ) , 0 ) #NEWLINE# self . assertEqual ( os . path . join ( svn_checkout_dest , tempFile . name ) , tempFile . name ) #NEWLINE# self . assertEqual ( svn_repo . get_revision ( tempFile . name ) , 1 )