~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Martin Pool
  • Date: 2011-08-02 01:10:27 UTC
  • mfrom: (6015.9.4 2.4)
  • mto: This revision was merged to the branch mainline in revision 6047.
  • Revision ID: mbp@canonical.com-20110802011027-cv8b6h9q18ctxle4
merge up 2.3 and 2.4 into trunk

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):