Kill u"..." string quotes. Thought I already did that.
This commit is contained in:
parent
b8142c3e64
commit
e5e80b8c56
|
@ -220,7 +220,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
|
||||
mode='eval', source='0', filename='tmp')
|
||||
if have_unicode:
|
||||
compile('print(u"\xe5")\n', '', 'exec')
|
||||
compile('print("\xe5")\n', '', 'exec')
|
||||
self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
|
||||
self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
|
||||
|
||||
|
@ -340,7 +340,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(eval(str('c'), globals, locals), 300)
|
||||
## bom = b'\xef\xbb\xbf'
|
||||
## self.assertEqual(eval(bom + b'a', globals, locals), 1)
|
||||
self.assertEqual(eval('u"\xe5"', globals), u"\xe5")
|
||||
self.assertEqual(eval('"\xe5"', globals), "\xe5")
|
||||
self.assertRaises(TypeError, eval)
|
||||
self.assertRaises(TypeError, eval, ())
|
||||
|
||||
|
|
|
@ -1227,14 +1227,6 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
|
|||
if (c == '"' || c == '\'')
|
||||
goto letter_quote;
|
||||
break;
|
||||
case 'u':
|
||||
case 'U':
|
||||
c = tok_nextc(tok);
|
||||
if (c == 'r' || c == 'R')
|
||||
c = tok_nextc(tok);
|
||||
if (c == '"' || c == '\'')
|
||||
goto letter_quote;
|
||||
break;
|
||||
case 'b':
|
||||
case 'B':
|
||||
c = tok_nextc(tok);
|
||||
|
|
Loading…
Reference in New Issue