From cf61c6859dcc4ebb70ede5327562142746ca0631 Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Tue, 22 Sep 2026 17:22:34 -0400 Subject: [PATCH] add test for check(...) of non-string --- pyflakes/test/test_api.py | 7 +++++++ 1 file changed, 7 insertions(+) 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): """