def test_reject_overlarge_stream_window_settings(self, frame_factory):
        """
        Remote attempts to create overlarge stream windows via SETTINGS frames
        are rejected.
        """
        c = h2.connection.H2Connection()
        c.initiate_connection()
        c.send_headers(1, self.example_request_headers)

        # Go one byte smaller than the limit.
        increment = 2**31 - c.outbound_flow_control_window - 1

        f = frame_factory.build_window_update_frame(
            stream_id=1, increment=increment
        )
        c.receive_data(f.serialize())

        # Receive an increment to the initial window size.
        f = frame_factory.build_settings_frame(
            settings={
                h2.settings.INITIAL_WINDOW_SIZE: self.DEFAULT_FLOW_WINDOW + 1
            }
        )
        c.clear_outbound_data_buffer()
        with pytest.raises(h2.exceptions.FlowControlError):
            c.receive_data(f.serialize())

        expected_frame = frame_factory.build_goaway_frame(
            last_stream_id=0,
            error_code=h2.errors.FLOW_CONTROL_ERROR,
        )
        assert c.data_to_send() == expected_frame.serialize()
dataset/ETHPy150Open python-hyper/hyper-h2/test/test_flow_control_window.py/TestFlowControl.test_reject_overlarge_stream_window_settings/swapped operands of `-`