~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_diff.py

  • Committer: Vincent Ladeuil
  • Date: 2016-02-01 16:50:54 UTC
  • mto: (6614.2.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6615.
  • Revision ID: v.ladeuil+lp@free.fr-20160201165054-ihgm2jt16ire1sye
Fix assert_ being deprecated by using assertTrue.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2012 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
61
61
        self.build_tree_contents([('hello', 'hello world!')])
62
62
        tree.commit(message='fixing hello')
63
63
        output = self.run_bzr('diff -r 2..3', retcode=1)[0]
64
 
        self.assert_('\n+hello world!' in output)
 
64
        self.assertTrue('\n+hello world!' in output)
65
65
        output = self.run_bzr('diff -c 3', retcode=1)[0]
66
 
        self.assert_('\n+hello world!' in output)
 
66
        self.assertTrue('\n+hello world!' in output)
67
67
        output = self.run_bzr('diff -r last:3..last:1', retcode=1)[0]
68
 
        self.assert_('\n+baz' in output)
 
68
        self.assertTrue('\n+baz' in output)
69
69
        output = self.run_bzr('diff -c last:2', retcode=1)[0]
70
 
        self.assert_('\n+baz' in output)
 
70
        self.assertTrue('\n+baz' in output)
71
71
        self.build_tree(['moo'])
72
72
        tree.add('moo')
73
73
        os.unlink('moo')
421
421
        self.make_example_branch()
422
422
        self.build_tree_contents([('hello', 'hello world!\n')])
423
423
        output = self.run_bzr_subprocess('diff', retcode=1)[0]
424
 
        self.assert_('\n+hello world!\n' in output)
 
424
        self.assertTrue('\n+hello world!\n' in output)