~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Martin Pool
  • Date: 2009-09-15 01:52:34 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: mbp@sourcefrog.net-20090915015234-lbvl4euj2z353zjl
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1723
1723
        self.assertEndsWith('foo', 'oo')
1724
1724
        self.assertRaises(AssertionError, self.assertEndsWith, 'o', 'oo')
1725
1725
 
 
1726
    def test_assertEqualDiff(self):
 
1727
        e = self.assertRaises(AssertionError,
 
1728
                              self.assertEqualDiff, '', '\n')
 
1729
        self.assertEquals(str(e),
 
1730
                          # Don't blink ! The '+' applies to the second string
 
1731
                          'first string is missing a final newline.\n+ \n')
 
1732
        e = self.assertRaises(AssertionError,
 
1733
                              self.assertEqualDiff, '\n', '')
 
1734
        self.assertEquals(str(e),
 
1735
                          # Don't blink ! The '-' applies to the second string
 
1736
                          'second string is missing a final newline.\n- \n')
 
1737
 
 
1738
 
 
1739
class TestDeprecations(tests.TestCase):
 
1740
 
1726
1741
    def test_applyDeprecated_not_deprecated(self):
1727
1742
        sample_object = ApplyDeprecatedHelper()
1728
1743
        # calling an undeprecated callable raises an assertion