diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-04-02 12:16:55 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-04-02 12:16:55 -0400 |
commit | d818fc9205d9121cde28a9cc2123772fcc531f29 (patch) | |
tree | b401d5e6d817c6100ea0ee28a9edee56548d0543 /Lib/test/test_exceptions.py | |
parent | f93c27eb53cd6ff3c6e7e5e8528a7e876cb6213e (diff) | |
parent | 9b09ba1234f8ba7a01eaf8986147ae0758712089 (diff) | |
download | cpython-git-d818fc9205d9121cde28a9cc2123772fcc531f29.tar.gz |
merge 3.4 (#21134)
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 80e921a44e..61347de11e 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -800,6 +800,12 @@ class ExceptionTests(unittest.TestCase): u.start = 1000 self.assertEqual(str(u), "can't translate characters in position 1000-4: 965230951443685724997") + def test_unicode_errors_no_object(self): + # See issue #21134. + klasses = UnicodeDecodeError, UnicodeDecodeError, UnicodeTranslateError + for klass in klasses: + self.assertEqual(str(klass.__new__(klass)), "") + @no_tracing def test_badisinstance(self): # Bug #2542: if issubclass(e, MyException) raises an exception, |