@skip('silverlight')
def test_file_encodings():
 sys.path.append(path_combine(os.getcwd(), 'tmp_encodings'))
 try:
  os.mkdir(path_combine(os.getcwd(), 'tmp_encodings'))
 except:
  pass
 try:
  for coding in ip_supported_encodings:
   if (is_net40 and (coding.lower().replace(' ', '-') == 'utf-16-be')):
    print 'http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=24082'
    continue
   temp_mod_name = ('test_encoding_' + coding.replace('-', '_').replace(' ', '_'))
   f = open(path_combine(os.getcwd(), 'tmp_encodings', (temp_mod_name + '.py')), 'w')
   f.write(('# coding: %s' % coding))
   f.close()
   if (temp_mod_name not in ['test_encoding_uTf!!!8']):
    __import__(temp_mod_name)
   os.remove(path_combine(os.getcwd(), 'tmp_encodings', (temp_mod_name + '.py')))
 finally:
  sys.path.remove(path_combine(os.getcwd(), 'tmp_encodings'))
  os.rmdir(path_combine(os.getcwd(), 'tmp_encodings'))

@ skip ( 'silverlight' ) def test_file_encodings ( ) : sys . path . append ( path_combine ( os . getcwd ( ) , 'tmp_encodings' ) ) try : os . mkdir ( path_combine ( os . getcwd ( ) , 'tmp_encodings' ) ) except : pass try : for coding in ip_supported_encodings : if ( is_net40 and ( coding . lower ( ) . replace ( ' ' , '-' ) == 'utf-16-be' ) ) : print 'http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=24082' continue temp_mod_name = ( 'test_encoding_' + coding . replace ( '-' , '_' ) . replace ( ' ' , '_' ) ) f = open ( path_combine ( os . getcwd ( ) , 'tmp_encodings' , ( temp_mod_name + '.py' ) ) , 'w' ) f . write ( ( '# coding: %s' % coding ) ) f . close ( ) if ( temp_mod_name not in [ 'test_encoding_uTf!!!8' ] ) : __import__ ( temp_mod_name ) os . remove ( path_combine ( os . getcwd ( ) , 'tmp_encodings' , ( temp_mod_name + '.py' ) ) ) finally : sys . path . remove ( path_combine ( os . getcwd ( ) , 'tmp_encodings' ) ) os . rmdir ( path_combine ( os . getcwd ( ) , 'tmp_encodings' ) )
once this gets fixed .