@ -166,9 +166,9 @@ class TestGitClBasic(unittest.TestCase):
cl . description = ' x '
cl . has_description = True
cl . FetchDescription = lambda * a , * * kw : ' y '
self . assertEqual s ( cl . GetDescription ( ) , ' x ' )
self . assertEqual s ( cl . GetDescription ( force = True ) , ' y ' )
self . assertEqual s ( cl . GetDescription ( ) , ' y ' )
self . assertEqual ( cl . GetDescription ( ) , ' x ' )
self . assertEqual ( cl . GetDescription ( force = True ) , ' y ' )
self . assertEqual ( cl . GetDescription ( ) , ' y ' )
def test_description_footers ( self ) :
cl = git_cl . Changelist ( issue = 1 , codereview_host = ' host ' )
@ -184,14 +184,14 @@ class TestGitClBasic(unittest.TestCase):
cl . has_description = True
cl . UpdateDescriptionRemote = lambda * a , * * kw : ' y '
msg , footers = cl . GetDescriptionFooters ( )
self . assertEqual s (
self . assertEqual (
msg , [ ' This is some message ' , ' ' , ' It has some lines ' , ' and, also ' ] )
self . assertEqual s ( footers , [ ( ' Some ' , ' Really ' ) , ( ' Awesome ' , ' Footers ' ) ] )
self . assertEqual ( footers , [ ( ' Some ' , ' Really ' ) , ( ' Awesome ' , ' Footers ' ) ] )
msg . append ( ' wut ' )
footers . append ( ( ' gnarly-dude ' , ' beans ' ) )
cl . UpdateDescriptionFooters ( msg , footers )
self . assertEqual s ( cl . GetDescription ( ) . splitlines ( ) , [
self . assertEqual ( cl . GetDescription ( ) . splitlines ( ) , [
' This is some message ' ,
' ' ,
' It has some lines ' ,
@ -667,7 +667,7 @@ class TestGitCl(TestCase):
def tearDown ( self ) :
try :
self . assertEqual s ( [ ] , self . calls )
self . assertEqual ( [ ] , self . calls )
except AssertionError :
if not self . has_failed ( ) :
raise
@ -1585,8 +1585,8 @@ class TestGitCl(TestCase):
ret = git_cl . upload_branch_deps ( MockChangelist ( ) , [ ] )
# CMDupload should have been called 5 times because of 5 dependent branches.
self . assertEqual s ( 5 , record_calls . times_called )
self . assertEqual s ( 0 , ret )
self . assertEqual ( 5 , record_calls . times_called )
self . assertEqual ( 0 , ret )
def test_gerrit_change_id ( self ) :
self . calls = [
@ -2146,7 +2146,7 @@ class TestGitCl(TestCase):
self . mock ( git_cl . sys , ' stdout ' , out )
def assertIssue ( cl_self , * _args ) :
self . assertEqual s ( cl_self . issue , 1 )
self . assertEqual ( cl_self . issue , 1 )
return ' foobar '
self . mock ( git_cl . Changelist , ' GetDescription ' , assertIssue )
@ -2158,7 +2158,7 @@ class TestGitCl(TestCase):
def test_SetCloseOverrideIssue ( self ) :
def assertIssue ( cl_self , * _args ) :
self . assertEqual s ( cl_self . issue , 1 )
self . assertEqual ( cl_self . issue , 1 )
return ' foobar '
self . mock ( git_cl . Changelist , ' GetDescription ' , assertIssue )
@ -2204,7 +2204,7 @@ class TestGitCl(TestCase):
current_desc = ' Some. \n \n Change-Id: xxx '
def RunEditor ( desc , _ , * * kwargs ) :
self . assertEqual s (
self . assertEqual (
' # Enter a description of the change. \n '
' # This will be displayed on the codereview site. \n '
' # The first line will also be used as the subject of the review. \n '
@ -2216,7 +2216,7 @@ class TestGitCl(TestCase):
return ' Some. \n \n Change-Id: xxx \n Bug: 123 '
def UpdateDescriptionRemote ( _ , desc , force = False ) :
self . assertEqual s ( desc , ' Some. \n \n Change-Id: xxx \n Bug: 123 ' )
self . assertEqual ( desc , ' Some. \n \n Change-Id: xxx \n Bug: 123 ' )
self . mock ( git_cl . sys , ' stdout ' , StringIO . StringIO ( ) )
self . mock ( git_cl . Changelist , ' GetDescription ' ,
@ -2238,7 +2238,7 @@ class TestGitCl(TestCase):
current_desc = ' Some. \n \n Fixed: 123 \n Change-Id: xxx '
def RunEditor ( desc , _ , * * kwargs ) :
self . assertEqual s (
self . assertEqual (
' # Enter a description of the change. \n '
' # This will be displayed on the codereview site. \n '
' # The first line will also be used as the subject of the review. \n '