Commit 69c04ee7 authored by Stefan Behnel's avatar Stefan Behnel

Fix combined testing of warnings and errors in test runner.

parent 544a92e1
...@@ -990,6 +990,8 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -990,6 +990,8 @@ class CythonCompileTestCase(unittest.TestCase):
self.fail('Nondeterministic file generation: %s' % ', '.join(diffs)) self.fail('Nondeterministic file generation: %s' % ', '.join(diffs))
tostderr = sys.__stderr__.write tostderr = sys.__stderr__.write
if expected_warnings or (expect_warnings and warnings):
self._match_output(expected_warnings, warnings, tostderr)
if 'cerror' in self.tags['tag']: if 'cerror' in self.tags['tag']:
if errors: if errors:
tostderr("\n=== Expected C compile error ===\n") tostderr("\n=== Expected C compile error ===\n")
...@@ -1000,8 +1002,6 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -1000,8 +1002,6 @@ class CythonCompileTestCase(unittest.TestCase):
elif errors or expected_errors: elif errors or expected_errors:
self._match_output(expected_errors, errors, tostderr) self._match_output(expected_errors, errors, tostderr)
return None return None
if expected_warnings or (expect_warnings and warnings):
self._match_output(expected_warnings, warnings, tostderr)
so_path = None so_path = None
if not self.cython_only: if not self.cython_only:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment