~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-22 09:03:35 UTC
  • mfrom: (4449.3.47 387717-progress-bar-tty)
  • Revision ID: pqm@pqm.ubuntu.com-20090722090335-m1okio1ev9bwytui
(mbp) various UIFactory cleanups including bug 387717

Show diffs side-by-side

added added

removed removed

Lines of Context:
1687
1687
    def test_assert_isinstance(self):
1688
1688
        self.assertIsInstance(2, int)
1689
1689
        self.assertIsInstance(u'', basestring)
1690
 
        self.assertRaises(AssertionError, self.assertIsInstance, None, int)
 
1690
        e = self.assertRaises(AssertionError, self.assertIsInstance, None, int)
 
1691
        self.assertEquals(str(e),
 
1692
            "None is an instance of <type 'NoneType'> rather than <type 'int'>")
1691
1693
        self.assertRaises(AssertionError, self.assertIsInstance, 23.3, int)
 
1694
        e = self.assertRaises(AssertionError,
 
1695
            self.assertIsInstance, None, int, "it's just not")
 
1696
        self.assertEquals(str(e),
 
1697
            "None is an instance of <type 'NoneType'> rather than <type 'int'>"
 
1698
            ": it's just not")
1692
1699
 
1693
1700
    def test_assertEndsWith(self):
1694
1701
        self.assertEndsWith('foo', 'oo')