~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_pull.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                          master_tree.branch.pull, other.branch, local = True)
99
99
        self.assertEqual([rev1], master_tree.branch.revision_history())
100
100
 
 
101
    def test_pull_raises_specific_error_on_master_connection_error(self):
 
102
        master_tree = self.make_branch_and_tree('master')
 
103
        checkout = master_tree.branch.create_checkout('checkout')
 
104
        other = master_tree.branch.bzrdir.sprout('other').open_workingtree()
 
105
        # move the branch out of the way on disk to cause a connection
 
106
        # error.
 
107
        os.rename('master', 'master_gone')
 
108
        # try to pull, which should raise a BoundBranchConnectionFailure.
 
109
        self.assertRaises(errors.BoundBranchConnectionFailure,
 
110
                checkout.branch.pull, other.branch)
 
111
 
101
112
    def test_pull_returns_result(self):
102
113
        parent = self.make_branch_and_tree('parent')
103
114
        parent.commit('1st post', rev_id='P1')