diff options
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 0b1fd1b8b9..55e9db3780 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -937,6 +937,11 @@ class ImportErrorTests(unittest.TestCase): self.assertEqual(exc.name, 'somename') self.assertEqual(exc.path, 'somepath') + def test_non_str_argument(self): + # Issue #15778 + arg = b'abc' + exc = ImportError(arg) + self.assertEqual(str(arg), str(exc)) def test_main(): |