#NEWLINE# @ given ( state = sampled_from ( h2 . connection . ConnectionState ) , input_ = sampled_from ( h2 . connection . ConnectionInputs ) ) #NEWLINE# def test_state_transitions( self , state , input_ ) : #NEWLINE# #INDENT# c = h2 . connection . H2ConnectionStateMachine ( ) #NEWLINE# c . state = state #NEWLINE# try : #NEWLINE# #INDENT# c . process_input ( input_ ) #NEWLINE# #UNINDENT# except h2 . exceptions . ProtocolError : #NEWLINE# #INDENT# assert ( c . state == h2 . connection . ConnectionState . CLOSED ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( c . state in h2 . connection . ConnectionState )