~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007, 2009, 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
54
54
        # allow both NoSuchRevision and GhostRevisionsHaveNoRevno here.
55
55
        self.assertRaises((errors.NoSuchRevision, errors.GhostRevisionsHaveNoRevno),
56
56
            tree.branch.revision_id_to_revno, "unknown")
57
 
        self.assertEquals(1, tree.branch.revision_id_to_revno("rev1"))
58
 
        self.assertEquals(2, tree.branch.revision_id_to_revno("rev2"))
 
57
        self.assertEqual(1, tree.branch.revision_id_to_revno("rev1"))
 
58
        self.assertEqual(2, tree.branch.revision_id_to_revno("rev2"))
59
59
 
60
60
    def test_empty(self):
61
61
        branch = self.make_branch('.')
62
62
        self.assertRaises(errors.NoSuchRevision,
63
63
            branch.revision_id_to_revno, "unknown")
64
 
        self.assertEquals(0, branch.revision_id_to_revno('null:'))
 
64
        self.assertEqual(0, branch.revision_id_to_revno('null:'))