@@ -76,7 +76,7 @@ def _print_fetchhead(self, repo):
7676 fp .close ()
7777
7878
79- def _test_fetch_result (self , results , remote ):
79+ def _do_test_fetch_result (self , results , remote ):
8080 # self._print_fetchhead(remote.repo)
8181 assert len (results ) > 0 and isinstance (results [0 ], FetchInfo )
8282 for info in results :
@@ -92,7 +92,7 @@ def _test_fetch_result(self, results, remote):
9292 # END forced update checking
9393 # END for each info
9494
95- def _test_push_result (self , results , remote ):
95+ def _do_test_push_result (self , results , remote ):
9696 assert len (results ) > 0 and isinstance (results [0 ], PushInfo )
9797 for info in results :
9898 assert info .flags
@@ -116,7 +116,7 @@ def _test_push_result(self, results, remote):
116116 # END for each info
117117
118118
119- def _test_fetch_info (self , repo ):
119+ def _do_test_fetch_info (self , repo ):
120120 self .failUnlessRaises (ValueError , FetchInfo ._from_line , repo , "nonsense" , '' )
121121 self .failUnlessRaises (ValueError , FetchInfo ._from_line , repo , "? [up to date] 0.1.7RC -> origin/0.1.7RC" , '' )
122122
@@ -129,16 +129,16 @@ def _commit_random_file(self, repo):
129129 index .commit ("Committing %s" % new_file )
130130 return new_file
131131
132- def _test_fetch (self ,remote , rw_repo , remote_repo ):
132+ def _do_test_fetch (self ,remote , rw_repo , remote_repo ):
133133 # specialized fetch testing to de-clutter the main test
134- self ._test_fetch_info (rw_repo )
134+ self ._do_test_fetch_info (rw_repo )
135135
136136 def fetch_and_test (remote , ** kwargs ):
137137 progress = TestRemoteProgress ()
138138 kwargs ['progress' ] = progress
139139 res = remote .fetch (** kwargs )
140140 progress .make_assertion ()
141- self ._test_fetch_result (res , remote )
141+ self ._do_test_fetch_result (res , remote )
142142 return res
143143 # END fetch and check
144144
@@ -273,21 +273,21 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
273273 progress = TestRemoteProgress ()
274274 res = remote .push (lhead .reference , progress )
275275 assert isinstance (res , IterableList )
276- self ._test_push_result (res , remote )
276+ self ._do_test_push_result (res , remote )
277277 progress .make_assertion ()
278278
279279 # rejected - undo last commit
280280 lhead .reset ("HEAD~1" )
281281 res = remote .push (lhead .reference )
282282 assert res [0 ].flags & PushInfo .ERROR
283283 assert res [0 ].flags & PushInfo .REJECTED
284- self ._test_push_result (res , remote )
284+ self ._do_test_push_result (res , remote )
285285
286286 # force rejected pull
287287 res = remote .push ('+%s' % lhead .reference )
288288 assert res [0 ].flags & PushInfo .ERROR == 0
289289 assert res [0 ].flags & PushInfo .FORCED_UPDATE
290- self ._test_push_result (res , remote )
290+ self ._do_test_push_result (res , remote )
291291
292292 # invalid refspec
293293 res = remote .push ("hellothere" )
@@ -301,13 +301,13 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
301301 res = remote .push (progress = progress , tags = True )
302302 assert res [- 1 ].flags & PushInfo .NEW_TAG
303303 progress .make_assertion ()
304- self ._test_push_result (res , remote )
304+ self ._do_test_push_result (res , remote )
305305
306306 # update push new tags
307307 # Rejection is default
308308 new_tag = TagReference .create (rw_repo , to_be_updated , ref = 'HEAD~1' , force = True )
309309 res = remote .push (tags = True )
310- self ._test_push_result (res , remote )
310+ self ._do_test_push_result (res , remote )
311311 assert res [- 1 ].flags & PushInfo .REJECTED and res [- 1 ].flags & PushInfo .ERROR
312312
313313 # push force this tag
@@ -316,7 +316,7 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
316316
317317 # delete tag - have to do it using refspec
318318 res = remote .push (":%s" % new_tag .path )
319- self ._test_push_result (res , remote )
319+ self ._do_test_push_result (res , remote )
320320 assert res [0 ].flags & PushInfo .DELETED
321321 progress .assert_received_message ()
322322
@@ -326,17 +326,17 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
326326 res = remote .push (new_head , progress )
327327 assert res [0 ].flags & PushInfo .NEW_HEAD
328328 progress .make_assertion ()
329- self ._test_push_result (res , remote )
329+ self ._do_test_push_result (res , remote )
330330
331331 # delete new branch on the remote end and locally
332332 res = remote .push (":%s" % new_head .path )
333- self ._test_push_result (res , remote )
333+ self ._do_test_push_result (res , remote )
334334 Head .delete (rw_repo , new_head )
335335 assert res [- 1 ].flags & PushInfo .DELETED
336336
337337 # --all
338338 res = remote .push (all = True )
339- self ._test_push_result (res , remote )
339+ self ._do_test_push_result (res , remote )
340340
341341 remote .pull ('master' )
342342
@@ -405,7 +405,7 @@ def test_base(self, rw_repo, remote_repo):
405405 # Only for remotes - local cases are the same or less complicated
406406 # as additional progress information will never be emitted
407407 if remote .name == "daemon_origin" :
408- self ._test_fetch (remote , rw_repo , remote_repo )
408+ self ._do_test_fetch (remote , rw_repo , remote_repo )
409409 ran_fetch_test = True
410410 # END fetch test
411411
0 commit comments