From 782293b360af3a012bd107f5c7106b152cc94d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 17 Mar 2020 12:25:09 +0100 Subject: [PATCH] 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. --- tests/test_mypy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_mypy.py b/tests/test_mypy.py index f2ee8f0..9e10216 100644 --- a/tests/test_mypy.py +++ b/tests/test_mypy.py @@ -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))