summaryrefslogtreecommitdiff
path: root/testutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'testutils.py')
-rw-r--r--testutils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/testutils.py b/testutils.py
index d60ab4670..8c01ee60f 100644
--- a/testutils.py
+++ b/testutils.py
@@ -312,9 +312,11 @@ class LintTestUpdate(LintTestUsingModule):
def _check_result(self, got):
if self._has_output():
- if got != self._get_expected():
- if not self.output:
- self.output = join(self.MSG_DIR, '%s.txt' % (self.module,))
+ try:
+ expected = self._get_expected()
+ except IOError:
+ expected = ''
+ if got != expected:
with open(self.output, 'w') as fobj:
fobj.write(got)