#NEWLINE# @ skipIf ( ( sys . version_info >= ( 3 , ) ) , 'not relevant' ) #NEWLINE# def test_misencodedFileUTF8( self ) : #NEWLINE# #INDENT# '\n        If a source file contains bytes which cannot be decoded, this is\n        reported on stderr.\n        ' #NEWLINE# SNOWMAN = unichr ( 9731 ) #NEWLINE# source = ( '# coding: ascii\nx = "%s"\n' % SNOWMAN ) . encode ( 'utf-8' ) #NEWLINE# sourcePath = self . makeTempFile ( self ) #NEWLINE# self . assertHasErrors ( sourcePath , [ ( '%s: problem decoding source\n' % ( sourcePath , ) ) ] )