summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-10-03 20:21:35 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-10-03 20:21:35 +0200
commit69c04ee7efd868b32726ca694d41439ba674a468 (patch)
treee72af41b902273278106b313f3315dff7470957a
parent544a92e1e375e1609b046cd23a7484a1cf7bc8ac (diff)
downloadcython-69c04ee7efd868b32726ca694d41439ba674a468.tar.gz
Fix combined testing of warnings and errors in test runner.
-rwxr-xr-xruntests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtests.py b/runtests.py
index 9f5f71edb..ed5f13f9b 100755
--- a/runtests.py
+++ b/runtests.py
@@ -990,6 +990,8 @@ class CythonCompileTestCase(unittest.TestCase):
self.fail('Nondeterministic file generation: %s' % ', '.join(diffs))
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 errors:
tostderr("\n=== Expected C compile error ===\n")
@@ -1000,8 +1002,6 @@ class CythonCompileTestCase(unittest.TestCase):
elif errors or expected_errors:
self._match_output(expected_errors, errors, tostderr)
return None
- if expected_warnings or (expect_warnings and warnings):
- self._match_output(expected_warnings, warnings, tostderr)
so_path = None
if not self.cython_only: