MyPy test fix

Newer versions of MyPy aren't silent any more when they complete succesfully,
so test for 'Success' in the message before failing the test.
This commit is contained in:
Sybren A. Stüvel 2020-03-17 12:25:09 +01:00
parent d3be952a77
commit 782293b360

View File

@ -28,5 +28,5 @@ class MypyRunnerTest(unittest.TestCase):
messages.append(stdout)
if status:
messages.append('Mypy failed with status %d' % status)
if messages:
if messages and not all(msg.startswith('Success: ') for msg in messages):
self.fail('\n'.join(['Mypy errors:'] + messages))