~garyvdm/pyjunitxml/consistant_test_ids

« back to all changes in this revision

Viewing changes to junitxml/__init__.py

  • Committer: Robert Collins
  • Date: 2009-12-12 06:42:03 UTC
  • Revision ID: robertc@robertcollins.net-20091212064203-43zl85ptsyjy04v2
Use the earliest known time as the start of the test run rather than simply the time when the test run started, giving sensible results when replaying recorded subunit streams in subunit2junitxml.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
 
77
77
    def time(self, a_datetime):
78
78
        self._set_time = a_datetime
 
79
        if (self._run_start is not None and
 
80
            self._run_start > a_datetime):
 
81
            self._run_start = a_datetime
79
82
 
80
83
    def startTest(self, test):
81
84
        self.__super.startTest(test)