~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: 2011-08-02 04:09:08 UTC
  • mfrom: (6046.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20110802040908-hqz2wr82nyrk14gk
(mbp) merge 2.3 and 2.4 to trunk (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1666
1666
        test.run(unittest.TestResult())
1667
1667
        self.assertEqual('original', obj.test_attr)
1668
1668
 
 
1669
    def test_recordCalls(self):
 
1670
        from bzrlib.tests import test_selftest
 
1671
        calls = self.recordCalls(
 
1672
            test_selftest, '_add_numbers')
 
1673
        self.assertEqual(test_selftest._add_numbers(2, 10),
 
1674
            12)
 
1675
        self.assertEquals(calls, [((2, 10), {})])
 
1676
 
 
1677
 
 
1678
def _add_numbers(a, b):
 
1679
    return a + b
 
1680
 
1669
1681
 
1670
1682
class _MissingFeature(features.Feature):
1671
1683
    def _probe(self):