<s> """<STR_LIT>""" <EOL> from pylearn2 . utils . mem import ( <EOL> TypicalMemoryError , <EOL> improve_memory_error_message <EOL> ) <EOL> def test_typical_memory_error ( ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raise TypicalMemoryError ( "<STR_LIT:test>" ) <EOL> except TypicalMemoryError as e : <EOL> pass <EOL> def test_improve_memory_error_message ( ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> improve_memory_error_message ( MemoryError ( ) , "<STR_LIT:test>" ) <EOL> except MemoryError as e : <EOL> assert len ( str ( e ) ) <EOL> try : <EOL> improve_memory_error_message ( MemoryError ( "<STR_LIT:test>" ) , "<STR_LIT>" ) <EOL> except MemoryError as e : <EOL> assert str ( e ) == "<STR_LIT:test>" </s>
