#NEWLINE# def test_check_errors( ) : #NEWLINE# #INDENT# wc = WordCloud ( ) #NEWLINE# assert_raises ( NotImplementedError , wc . to_html ) #NEWLINE# try : #NEWLINE# #INDENT# np . array ( wc ) #NEWLINE# raise AssertionError ( "np.array(wc) didn't raise" ) #NEWLINE# #UNINDENT# except ValueError as e : #NEWLINE# #INDENT# assert_true ( ( 'call generate' in str ( e ) ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# wc . recolor ( ) #NEWLINE# raise AssertionError ( "wc.recolor didn't raise" ) #NEWLINE# #UNINDENT# except ValueError as e : #NEWLINE# #INDENT# assert_true ( ( 'call generate' in str ( wc ) ) )