~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2012, 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
363
363
 
364
364
    def test_as_tree(self):
365
365
        tree = self.get_as_tree('0')
366
 
        self.assertEquals(_mod_revision.NULL_REVISION, tree.get_revision_id())
 
366
        self.assertEqual(_mod_revision.NULL_REVISION, tree.get_revision_id())
367
367
        tree = self.get_as_tree('1')
368
 
        self.assertEquals('r1', tree.get_revision_id())
 
368
        self.assertEqual('r1', tree.get_revision_id())
369
369
        tree = self.get_as_tree('2')
370
 
        self.assertEquals('r2', tree.get_revision_id())
 
370
        self.assertEqual('r2', tree.get_revision_id())
371
371
        tree = self.get_as_tree('-2')
372
 
        self.assertEquals('r1', tree.get_revision_id())
 
372
        self.assertEqual('r1', tree.get_revision_id())
373
373
        tree = self.get_as_tree('-1')
374
 
        self.assertEquals('r2', tree.get_revision_id())
 
374
        self.assertEqual('r2', tree.get_revision_id())
375
375
        tree = self.get_as_tree('1.1.1')
376
 
        self.assertEquals('alt_r2', tree.get_revision_id())
 
376
        self.assertEqual('alt_r2', tree.get_revision_id())
377
377
 
378
378
 
379
379
class TestRevisionSpec_revid(TestRevisionSpec):
656
656
 
657
657
    def test_as_tree(self):
658
658
        tree = self.get_as_tree('branch:tree', self.tree2)
659
 
        self.assertEquals('r2', tree.get_revision_id())
 
659
        self.assertEqual('r2', tree.get_revision_id())
660
660
        self.assertFalse(self.tree2.branch.repository.has_revision('r2'))
661
661
 
662
662