~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-16 13:39:39 UTC
  • mto: (5923.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5925.
  • Revision ID: jelmer@samba.org-20110516133939-8u1pc9utas3uw1lt
Require a unicode prompt to be passed into all methods that prompt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        self.assertFalse(b._transport.has('branch-name'))
62
62
        b.bzrdir.open_workingtree().commit(message='foo', allow_pointless=True)
63
63
 
64
 
    def test_branch_broken_pack(self):
65
 
        """branching with a corrupted pack file."""
66
 
        self.example_branch('a')
67
 
        #now add some random corruption
68
 
        fname = 'a/.bzr/repository/packs/' + os.listdir('a/.bzr/repository/packs')[0]
69
 
        with open(fname, 'rb+') as f:
70
 
            f.seek(750)
71
 
            f.write("\xff")
72
 
        self.run_bzr_error(['Corruption while decompressing repository file'], 
73
 
                            'branch a b', retcode=3)
74
 
 
75
64
    def test_branch_switch_no_branch(self):
76
65
        # No branch in the current directory:
77
66
        #  => new branch will be created, but switch fails