def test_string_literals_are_prefixed():
 errors = []
 for (abs_path, rel_path) in walk_python_files():
  if (rel_path in _STRING_LITERALS_WHITELIST):
   continue
  problems = find_unprefixed_string_literals(abs_path)
  if problems:
   errors.append((rel_path, problems))
 if errors:
  lines = [u'Unprefixed string literals:']
  for (filename, problems) in errors:
   lines.append((u'  ' + filename))
   for (line_no, col_no) in problems:
    lines.append(u'    line {}, column {}'.format(line_no, col_no))
  raise AssertionError(u'\n'.join(lines))

def test_string_literals_are_prefixed ( ) : errors = [ ] for ( abs_path , rel_path ) in walk_python_files ( ) : if ( rel_path in _STRING_LITERALS_WHITELIST ) : continue problems = find_unprefixed_string_literals ( abs_path ) if problems : errors . append ( ( rel_path , problems ) ) if errors : lines = [ u'Unprefixed string literals:' ] for ( filename , problems ) in errors : lines . append ( ( u'  ' + filename ) ) for ( line_no , col_no ) in problems : lines . append ( u'    line {}, column {}' . format ( line_no , col_no ) ) raise AssertionError ( u'\n' . join ( lines ) )
test that string literals are prefixed by u .