def test_unicode_escapes():
 s = '"a\\xac\\u1234\\u20ac\\U00008000"'
 assert (len(s) == 29)
 entry = tokenize(s)[0]
 assert (len(entry) == 5)
 assert ([ord(x) for x in entry] == [97, 172, 4660, 8364, 32768])

def test_unicode_escapes ( ) : s = '"a\\xac\\u1234\\u20ac\\U00008000"' assert ( len ( s ) == 29 ) entry = tokenize ( s ) [ 0 ] assert ( len ( entry ) == 5 ) assert ( [ ord ( x ) for x in entry ] == [ 97 , 172 , 4660 , 8364 , 32768 ] )
ensure unicode escapes are handled correctly .