def test_ur_literals():
 def check(literal):
  io = StringIO(u(literal))
  tokens = tokenize.generate_tokens(io.readline)
  token_list = list(tokens)
  (typ, result_literal, _, _) = token_list[0]
  assert (typ == STRING)
  assert (result_literal == literal)
 check('u""')
 check('ur""')
 check('Ur""')
 check('UR""')
 check('bR""')
 with pytest.raises(AssertionError):
  check('Rb""')

def test_ur_literals ( ) : def check ( literal ) : io = StringIO ( u ( literal ) ) tokens = tokenize . generate_tokens ( io . readline ) token_list = list ( tokens ) ( typ , result_literal , _ , _ ) = token_list [ 0 ] assert ( typ == STRING ) assert ( result_literal == literal ) check ( 'u""' ) check ( 'ur""' ) check ( 'Ur""' ) check ( 'UR""' ) check ( 'bR""' ) with pytest . raises ( AssertionError ) : check ( 'Rb""' )
decided to parse u literals regardless of python version .