@@ -299,17 +299,34 @@ def _test_push_and_pull(self,remote, rw_repo, remote_repo):
299299 self ._test_push_result (res , remote )
300300 assert res [0 ].flags & PushInfo .DELETED
301301
302- self .fail ("test --all" )
303-
304302 # push new branch
303+ new_head = Head .create (rw_repo , "my_new_branch" )
304+ progress = TestPushProgress ()
305+ res = remote .push (new_head , progress )
306+ assert res [0 ].flags & PushInfo .NEW_HEAD
307+ progress .make_assertion ()
308+ self ._test_push_result (res , remote )
305309
306- # delete new branch
310+ # delete new branch on the remote end and locally
311+ res = remote .push (":%s" % new_head .path )
312+ self ._test_push_result (res , remote )
313+ Head .delete (rw_repo , new_head )
314+ assert res [- 1 ].flags & PushInfo .DELETED
315+
316+ # --all
317+ res = remote .push (all = True )
318+ self ._test_push_result (res , remote )
307319
308320 # pull is essentially a fetch + merge, hence we just do a light
309321 # test here, leave the reset to the actual merge testing
310322 # fails as we did not specify a branch and there is no configuration for it
311323 self .failUnlessRaises (GitCommandError , remote .pull )
312324 remote .pull ('master' )
325+
326+ # cleanup - delete created tags and branches as we are in an innerloop on
327+ # the same repository
328+ TagReference .delete (rw_repo , new_tag , other_tag )
329+ remote .push (":%s" % other_tag .path )
313330
314331 @with_rw_and_rw_remote_repo ('0.1.6' )
315332 def test_base (self , rw_repo , remote_repo ):
0 commit comments