~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        # this line is more of a working tree test line, but - what the hey,
95
95
        # it has work to do.
96
96
        b_child.bzrdir.open_workingtree().update()
97
 
        self.failUnlessExists('child/a')
98
 
        self.failUnlessExists('child/b')
 
97
        self.assertPathExists('child/a')
 
98
        self.assertPathExists('child/b')
99
99
 
100
100
        b_child.unbind()
101
101
        self.assertEqual(None, b_child.get_bound_location())
150
150
        # TestCaseWithSFTPServer only allows you to connect one time
151
151
        # to the SFTP server. So we have to create a connection and
152
152
        # keep it around, so that it can be reused
153
 
        __unused_t = transport.get_transport(self.get_url('.'))
 
153
        __unused_t = self.get_transport()
154
154
 
155
155
        wt_base = b_base.bzrdir.open_workingtree()
156
156
        open('base/a', 'wb').write('new base contents\n')
292
292
        wt_other.add('c')
293
293
        wt_other.commit('adding c', rev_id='r@d-2')
294
294
 
295
 
        self.failIf(wt_child.branch.repository.has_revision('r@d-2'))
296
 
        self.failIf(b_base.repository.has_revision('r@d-2'))
 
295
        self.assertFalse(wt_child.branch.repository.has_revision('r@d-2'))
 
296
        self.assertFalse(b_base.repository.has_revision('r@d-2'))
297
297
 
298
298
        wt_child.merge_from_branch(wt_other.branch)
299
299
 
300
 
        self.failUnlessExists('child/c')
 
300
        self.assertPathExists('child/c')
301
301
        self.assertEqual(['r@d-2'], wt_child.get_parent_ids()[1:])
302
 
        self.failUnless(wt_child.branch.repository.has_revision('r@d-2'))
303
 
        self.failIf(b_base.repository.has_revision('r@d-2'))
 
302
        self.assertTrue(wt_child.branch.repository.has_revision('r@d-2'))
 
303
        self.assertFalse(b_base.repository.has_revision('r@d-2'))
304
304
 
305
305
        # Commit should succeed, and cause merged revisions to
306
306
        # be pushed into base
307
307
        wt_child.commit('merge other', rev_id='r@c-2')
308
308
        self.assertEqual(['r@b-1', 'r@c-2'], wt_child.branch.revision_history())
309
309
        self.assertEqual(['r@b-1', 'r@c-2'], b_base.revision_history())
310
 
        self.failUnless(b_base.repository.has_revision('r@d-2'))
 
310
        self.assertTrue(b_base.repository.has_revision('r@d-2'))
311
311
 
312
312
    def test_commit_fails(self):
313
313
        b_base, wt_child = self.create_branches()