Commit 8ffd853e authored by Stefan Behnel's avatar Stefan Behnel

Stop using deprecated unittest methods in test runner.

parent d1790830
...@@ -1064,13 +1064,13 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -1064,13 +1064,13 @@ class CythonCompileTestCase(unittest.TestCase):
def _match_output(self, expected_output, actual_output, write): def _match_output(self, expected_output, actual_output, write):
try: try:
for expected, actual in zip(expected_output, actual_output): for expected, actual in zip(expected_output, actual_output):
self.assertEquals(expected, actual) self.assertEqual(expected, actual)
if len(actual_output) < len(expected_output): if len(actual_output) < len(expected_output):
expected = expected_output[len(actual_output)] expected = expected_output[len(actual_output)]
self.assertEquals(expected, None) self.assertEqual(expected, None)
elif len(actual_output) > len(expected_output): elif len(actual_output) > len(expected_output):
unexpected = actual_output[len(expected_output)] unexpected = actual_output[len(expected_output)]
self.assertEquals(None, unexpected) self.assertEqual(None, unexpected)
except AssertionError: except AssertionError:
write("\n=== Expected: ===\n") write("\n=== Expected: ===\n")
write('\n'.join(expected_output)) write('\n'.join(expected_output))
......
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