#NEWLINE# @ given ( integers ( ) ) #NEWLINE# def test_cannot_set_invalid_vals_for_initial_window_size( self , val ) : #NEWLINE# #INDENT# '\n        SETTINGS_INITIAL_WINDOW_SIZE only allows values between 0 and 2**32 - 1\n        inclusive.\n        ' #NEWLINE# s = h2 . settings . Settings ( ) #NEWLINE# if ( 0 <= val <= ( ( 2 ** 31 ) - 1 ) ) : #NEWLINE# #INDENT# s . initial_window_size = val #NEWLINE# s . acknowledge ( ) #NEWLINE# assert ( s . initial_window_size == val ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# with pytest . raises ( h2 . exceptions . InvalidSettingsValueError ) as e : #NEWLINE# #INDENT# s . initial_window_size = val #NEWLINE# #UNINDENT# s . acknowledge ( ) #NEWLINE# assert ( e . value . error_code == h2 . errors . FLOW_CONTROL_ERROR ) #NEWLINE# assert ( s . initial_window_size == 65535 ) #NEWLINE# with pytest . raises ( h2 . exceptions . InvalidSettingsValueError ) as e : #NEWLINE# #INDENT# s [ h2 . settings . INITIAL_WINDOW_SIZE ] = val #NEWLINE# #UNINDENT# s . acknowledge ( ) #NEWLINE# assert ( val . value . error_code == h2 . errors . FLOW_CONTROL_ERROR ) #NEWLINE# assert ( s [ h2 . settings . INITIAL_WINDOW_SIZE ] == 65535 )