Show More
@@ -530,6 +530,14 b' class Test(unittest.TestCase):' | |||||
530 | elif ret is False: |
|
530 | elif ret is False: | |
531 | raise WarnTest('no result code from test') |
|
531 | raise WarnTest('no result code from test') | |
532 | elif out != self._refout: |
|
532 | elif out != self._refout: | |
|
533 | # Diff generation may rely on written .err file. | |||
|
534 | if (ret != 0 or out != self._refout) and not self._skipped \ | |||
|
535 | and not self._debug: | |||
|
536 | f = open(self.errpath, 'wb') | |||
|
537 | for line in out: | |||
|
538 | f.write(line) | |||
|
539 | f.close() | |||
|
540 | ||||
533 | # The result object handles diff calculation for us. |
|
541 | # The result object handles diff calculation for us. | |
534 | self._result.addOutputMismatch(self, ret, out, self._refout) |
|
542 | self._result.addOutputMismatch(self, ret, out, self._refout) | |
535 |
|
543 | |||
@@ -538,13 +546,6 b' class Test(unittest.TestCase):' | |||||
538 | else: |
|
546 | else: | |
539 | msg = 'output changed' |
|
547 | msg = 'output changed' | |
540 |
|
548 | |||
541 | if (ret != 0 or out != self._refout) and not self._skipped \ |
|
|||
542 | and not self._debug: |
|
|||
543 | f = open(self.errpath, 'wb') |
|
|||
544 | for line in out: |
|
|||
545 | f.write(line) |
|
|||
546 | f.close() |
|
|||
547 |
|
||||
548 | self.fail(msg) |
|
549 | self.fail(msg) | |
549 | elif ret: |
|
550 | elif ret: | |
550 | self.fail(describe(ret)) |
|
551 | self.fail(describe(ret)) |
General Comments 0
You need to be logged in to leave comments.
Login now