comparison tests/run-tests.py @ 21735:5ee547fdb0be

run-tests: produce error on running a failing test This patch fixes a regression recently introduced by a refactoring (see 92a6b16c9186 and about 200 previous changesets from Gregory Szorc). It produce an error message everytime with a test filename which gets fail while testing except at one condition when '--nodiff' option is enabled.
author anuraggoel <anurag.dsps@gmail.com>
date Thu, 12 Jun 2014 01:36:57 +0530
parents 9ad11d5bcc2f
children 07eb76186b41
comparison
equal deleted inserted replaced
21734:34e0bd895afc 21735:5ee547fdb0be
1074 def addFailure(self, test, reason): 1074 def addFailure(self, test, reason):
1075 self.failures.append((test, reason)) 1075 self.failures.append((test, reason))
1076 1076
1077 if self._options.first: 1077 if self._options.first:
1078 self.stop() 1078 self.stop()
1079 else:
1080 if not self._options.nodiff:
1081 self.stream.write('\nERROR: %s output changed\n' % test)
1079 1082
1080 def addError(self, *args, **kwargs): 1083 def addError(self, *args, **kwargs):
1081 super(TestResult, self).addError(*args, **kwargs) 1084 super(TestResult, self).addError(*args, **kwargs)
1082 1085
1083 if self._options.first: 1086 if self._options.first: