diff options
author | Guido van Rossum <guido@python.org> | 2007-07-18 21:02:47 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-18 21:02:47 +0000 |
commit | 697a84b16c9561a2035c0f74dfc0af0b5b868149 (patch) | |
tree | e142a8a3ba8efef6a02cb71d7cf31cfcd3dd5a07 /Lib/test | |
parent | 7eb6ca54a740da19fa5d98c1c1f4b33536d7a39b (diff) | |
download | cpython-git-697a84b16c9561a2035c0f74dfc0af0b5b868149.tar.gz |
Make test_unicode pass after the lexer was fixed to turn unicode errors
into syntax errors.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_unicode.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 11c7328bdd..f09721a2c6 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -55,9 +55,10 @@ class UnicodeTest( def test_literals(self): self.assertEqual('\xff', '\u00ff') self.assertEqual('\uffff', '\U0000ffff') - self.assertRaises(UnicodeError, eval, '\'\\Ufffffffe\'') - self.assertRaises(UnicodeError, eval, '\'\\Uffffffff\'') - self.assertRaises(UnicodeError, eval, '\'\\U%08x\'' % 0x110000) + self.assertRaises((UnicodeError, SyntaxError), eval, '\'\\Ufffffffe\'') + self.assertRaises((UnicodeError, SyntaxError), eval, '\'\\Uffffffff\'') + self.assertRaises((UnicodeError, SyntaxError), + eval, '\'\\U%08x\'' % 0x110000) def test_repr(self): if not sys.platform.startswith('java'): |