Kaydet (Commit) 697a84b1 authored tarafından Guido van Rossum's avatar Guido van Rossum

Make test_unicode pass after the lexer was fixed to turn unicode errors

into syntax errors.
üst 7eb6ca54
......@@ -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'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment