diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py index d05dd968..a7c492a7 100644 --- a/pyflakes/test/test_api.py +++ b/pyflakes/test/test_api.py @@ -624,6 +624,13 @@ def test_stdinReportsErrors(self): ] self.assertEqual(errlines, expected_error) + def test_check_unknown_error(self): + err = io.StringIO() + count = withStderrTo(err, check, None, '') + self.assertEqual(count, 1) + # XXX: this hides the actual error -- probably should just let it raise? + self.assertEqual(err.getvalue(), ': problem decoding source\n') + class IntegrationTests(TestCase): """