~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Carl Friedrich Bolz
  • Date: 2006-07-05 11:32:40 UTC
  • mto: This revision was merged to the branch mainline in revision 1928.
  • Revision ID: cfbolz@gmx.de-20060705113240-5fd89b1f29551806
(lifeless, cfbolz, hpk): Give the test result object an optional benchmark
output file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
    """
133
133
    stop_early = False
134
134
    
135
 
    def __init__(self, stream, descriptions, verbosity, pb=None):
 
135
    def __init__(self, stream, descriptions, verbosity, pb=None,
 
136
                 bench_history=None):
136
137
        unittest._TextTestResult.__init__(self, stream, descriptions, verbosity)
137
138
        self.pb = pb
 
139
        if bench_history is not None:
 
140
            bench_history.write("--date %s" % time.time())
138
141
    
139
142
    def extractBenchmarkTime(self, testCase):
140
143
        """Add a benchmark time for the current test case."""