~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Vincent Ladeuil
  • Date: 2016-02-01 18:09:18 UTC
  • mfrom: (6614.1.3 assert)
  • mto: This revision was merged to the branch mainline in revision 6615.
  • Revision ID: v.ladeuil+lp@free.fr-20160201180918-jqtq8ol6gdbbbtpv
Fix deprecated assertions to unblock release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-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
456
456
        newtip = transform2.new_file('tip', oz_id, 'other', 'tip-id')
457
457
        result = transform2.find_conflicts()
458
458
        fp = FinalPaths(transform2)
459
 
        self.assert_('oz/tip' in transform2._tree_path_ids)
 
459
        self.assertTrue('oz/tip' in transform2._tree_path_ids)
460
460
        self.assertEqual(fp.get_path(newtip), pathjoin('oz', 'tip'))
461
461
        self.assertEqual(len(result), 2)
462
462
        self.assertEqual((result[0][0], result[0][1]),
801
801
        os.symlink = None
802
802
        try:
803
803
            err = self.assertRaises(errors.UnableCreateSymlink, tt_helper)
804
 
            self.assertEquals(
 
804
            self.assertEqual(
805
805
                "Unable to create symlink 'foo' on this platform",
806
806
                str(err))
807
807
        finally:
3642
3642
            warnings.append(args[0] % args[1:])
3643
3643
        self.overrideAttr(trace, 'warning', warning)
3644
3644
        remaining_conflicts = resolve_conflicts(tt)
3645
 
        self.assertEquals(['dir/foo has been orphaned in bzr-orphans'],
 
3645
        self.assertEqual(['dir/foo has been orphaned in bzr-orphans'],
3646
3646
                          warnings)
3647
3647
        # Yeah for resolved conflicts !
3648
3648
        self.assertLength(0, remaining_conflicts)
3649
3649
        # We have a new orphan
3650
 
        self.assertEquals('foo.~1~', tt.final_name(orphan_tid))
3651
 
        self.assertEquals('bzr-orphans',
 
3650
        self.assertEqual('foo.~1~', tt.final_name(orphan_tid))
 
3651
        self.assertEqual('bzr-orphans',
3652
3652
                          tt.final_name(tt.final_parent(orphan_tid)))
3653
3653
 
3654
3654
    def test_never_orphan(self):
3714
3714
        old_root_id = transform.tree_file_id(root)
3715
3715
        transform.apply()
3716
3716
        self.assertEqual(old_root_id, self.wt.get_root_id())
3717
 
        self.assertEquals([(self.wt, transform)], calls)
 
3717
        self.assertEqual([(self.wt, transform)], calls)
3718
3718
 
3719
3719
    def test_post_commit_hooks(self):
3720
3720
        calls = []
3726
3726
        old_root_id = transform.tree_file_id(root)
3727
3727
        transform.apply()
3728
3728
        self.assertEqual(old_root_id, self.wt.get_root_id())
3729
 
        self.assertEquals([(self.wt, transform)], calls)
 
3729
        self.assertEqual([(self.wt, transform)], calls)