~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_cat.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) 2005-2012 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
35
35
        tree.commit(message='1')
36
36
        self.build_tree_contents([('branch/a', 'baz\n')])
37
37
 
38
 
        self.assertEquals('foo\n',
 
38
        self.assertEqual('foo\n',
39
39
                          self.run_bzr(['cat', 'a'], working_dir='branch')[0])
40
40
 
41
41
        # On Windows, we used to have a bug where newlines got changed into
42
42
        # crlf, whereas cat ought to write out the file exactly as it's
43
43
        # recorded (by default.)  That problem can't be reproduced in-process,
44
44
        # so we need just one test here that 
45
 
        self.assertEquals('foo\n',
 
45
        self.assertEqual('foo\n',
46
46
                          self.run_bzr_subprocess(['cat', 'a'],
47
47
                                                  working_dir='branch')[0])
48
48
 
49
49
        tree.commit(message='2')
50
 
        self.assertEquals(
 
50
        self.assertEqual(
51
51
            'baz\n', self.run_bzr(['cat', 'a'], working_dir='branch')[0])
52
 
        self.assertEquals(
 
52
        self.assertEqual(
53
53
            'foo\n', self.run_bzr(['cat', 'a', '-r', '1'],
54
54
                                  working_dir='branch')[0])
55
 
        self.assertEquals(
 
55
        self.assertEqual(
56
56
            'baz\n', self.run_bzr(['cat', 'a', '-r', '-1'],
57
57
                                  working_dir='branch')[0])
58
58
 
59
59
        rev_id = tree.branch.last_revision()
60
60
 
61
 
        self.assertEquals(
 
61
        self.assertEqual(
62
62
            'baz\n', self.run_bzr(['cat', 'a', '-r', 'revid:%s' % rev_id],
63
63
                                  working_dir='branch')[0])
64
64
 
65
 
        self.assertEquals('foo\n',
 
65
        self.assertEqual('foo\n',
66
66
                          self.run_bzr(['cat', 'branch/a',
67
67
                                        '-r', 'revno:1:branch'])[0])
68
68
        self.run_bzr(['cat', 'a'], retcode=3)