<s> from asciimatics . effects import Effect <EOL> from asciimatics . exceptions import StopApplication , NextScene <EOL> class MockEffect ( Effect ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , count = <NUM_LIT:10> , stop = True , swallow = False ) : <EOL> """<STR_LIT>""" <EOL> super ( MockEffect , self ) . __init__ ( ) <EOL> self . stop_called = False <EOL> self . reset_called = False <EOL> self . event_called = False <EOL> self . save_called = False <EOL> self . _count = count <EOL> self . _stop = stop <EOL> self . _swallow = swallow <EOL> @ property <EOL> def stop_frame ( self ) : <EOL> self . stop_called = True <EOL> return <NUM_LIT:5> <EOL> def _update ( self , frame_no ) : <EOL> self . _count -= <NUM_LIT:1> <EOL> if self . _count <= <NUM_LIT:0> : <EOL> if self . _stop : <EOL> raise StopApplication ( "<STR_LIT>" ) <EOL> else : <EOL> raise NextScene ( ) <EOL> def reset ( self ) : <EOL> self . reset_called = True <EOL> def process_event ( self , event ) : <EOL> self . event_called = True <EOL> return None if self . _swallow else event <EOL> def save ( self ) : <EOL> self . save_called = True </s>
