~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2007-02-09 17:16:26 UTC
  • mto: This revision was merged to the branch mainline in revision 2294.
  • Revision ID: john@arbash-meinel.com-20070209171626-x3gg6hgainzs91sj
Make sure Branch.revision_history() also works in utf-8 revision ids.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        self.assertEquals(br.revision_history(), ["rev1", "rev2", "rev3"])
90
90
        self.assertRaises(errors.ReservedId, br.append_revision, 'current:')
91
91
 
 
92
    def test_revision_ids_are_utf8(self):
 
93
        br = self.get_branch()
 
94
        br.set_revision_history(['rev1', 'rev2', 'rev3'])
 
95
        rh = br.revision_history()
 
96
        self.assertEqual(['rev1', 'rev2', 'rev3'], rh)
 
97
        for revision_id in rh:
 
98
            self.assertIsInstance(revision_id, str)
 
99
        last = br.last_revision()
 
100
        self.assertEqual('rev3', last)
 
101
        self.assertIsInstance(last, str)
 
102
 
92
103
    def test_fetch_revisions(self):
93
104
        """Test fetch-revision operation."""
94
105
        get_transport(self.get_url()).mkdir('b1')