~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Aaron Bentley
  • Date: 2006-06-06 17:10:05 UTC
  • mfrom: (1744 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1748.
  • Revision ID: aaron.bentley@utoronto.ca-20060606171005-e2b50e39cd5056be
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
458
458
        self.time(time.sleep, 0.001)
459
459
        result.extractBenchmarkTime(self)
460
460
        timed_string = result._testTimeString()
461
 
        self.assertContainsRe(timed_string, "^    [0-9]ms/   [ 1-9][0-9]ms$")
 
461
        self.assertContainsRe(timed_string, "^   [ 1-9][0-9]ms/   [ 1-9][0-9]ms$")
462
462
        # extracting the time from a non-bzrlib testcase sets to None
463
463
        result._recordTestStartTime()
464
464
        result.extractBenchmarkTime(
465
465
            unittest.FunctionTestCase(self.test_elapsed_time_with_benchmarking))
466
466
        timed_string = result._testTimeString()
467
 
        self.assertContainsRe(timed_string, "^          [0-9]ms$")
 
467
        self.assertContainsRe(timed_string, "^         [ 1-9][0-9]ms$")
468
468
        # cheat. Yes, wash thy mouth out with soap.
469
469
        self._benchtime = None
470
470
 
509
509
        self.assertContainsRe(result_stream.getvalue(), 
510
510
            r"LSProf output for <type 'unicode'>\(\('hello',\), {'errors': 'replace'}\)\n"
511
511
            r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
512
 
            r" +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n"
 
512
            r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
513
513
            r"LSProf output for <type 'unicode'>\(\('world',\), {'errors': 'replace'}\)\n"
514
514
            r" *CallCount *Recursive *Total\(ms\) *Inline\(ms\) *module:lineno\(function\)\n"
515
 
            r" +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n"
 
515
            r"( +1 +0 +0\.\d+ +0\.\d+ +<method 'disable' of '_lsprof\.Profiler' objects>\n)?"
516
516
            )
517
517
 
518
518