~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Aaron Bentley
  • Date: 2007-06-18 20:04:16 UTC
  • mfrom: (2533 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2534.
  • Revision ID: abentley@panoramicfeedback.com-20070618200416-9b164rn1a60uh82p
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
681
681
 
682
682
    def test_lsprofiling(self):
683
683
        """Verbose test result prints lsprof statistics from test cases."""
684
 
        self.requireFeature(test_lsprof.LSProf())
 
684
        self.requireFeature(test_lsprof.LSProfFeature)
685
685
        result_stream = StringIO()
686
686
        result = bzrlib.tests.VerboseTestResult(
687
687
            unittest._WritelnDecorator(result_stream),
970
970
        def skipping_test():
971
971
            raise TestSkipped('test intentionally skipped')
972
972
 
973
 
        runner = TextTestRunner(stream=self._log_file, keep_output=True)
 
973
        runner = TextTestRunner(stream=self._log_file)
974
974
        test = unittest.FunctionTestCase(skipping_test)
975
975
        result = self.run_test_runner(runner, test)
976
976
        self.assertTrue(result.wasSuccessful())
989
989
            def cleanup(self):
990
990
                self.counter -= 1
991
991
 
992
 
        runner = TextTestRunner(stream=self._log_file, keep_output=True)
 
992
        runner = TextTestRunner(stream=self._log_file)
993
993
        test = SkippedSetupTest('test_skip')
994
994
        result = self.run_test_runner(runner, test)
995
995
        self.assertTrue(result.wasSuccessful())
1009
1009
            def cleanup(self):
1010
1010
                self.counter -= 1
1011
1011
 
1012
 
        runner = TextTestRunner(stream=self._log_file, keep_output=True)
 
1012
        runner = TextTestRunner(stream=self._log_file)
1013
1013
        test = SkippedTest('test_skip')
1014
1014
        result = self.run_test_runner(runner, test)
1015
1015
        self.assertTrue(result.wasSuccessful())
1193
1193
        
1194
1194
        Each self.time() call is individually and separately profiled.
1195
1195
        """
1196
 
        self.requireFeature(test_lsprof.LSProf())
 
1196
        self.requireFeature(test_lsprof.LSProfFeature)
1197
1197
        # overrides the class member with an instance member so no cleanup 
1198
1198
        # needed.
1199
1199
        self._gather_lsprof_in_benchmarks = True