77"""
88import pytest
99
10- from hypothesis import given
10+ from hypothesis import given , settings , HealthCheck
1111from hypothesis .strategies import integers
1212
1313import h2 .config
@@ -715,6 +715,7 @@ def _setup_connection_and_send_headers(self, frame_factory):
715715 return c
716716
717717 @given (stream_id = integers (max_value = 0 ))
718+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
718719 def test_must_acknowledge_for_stream (self , frame_factory , stream_id ):
719720 """
720721 Flow control acknowledgements must be done on a stream ID that is
@@ -740,6 +741,7 @@ def test_must_acknowledge_for_stream(self, frame_factory, stream_id):
740741 )
741742
742743 @given (size = integers (max_value = - 1 ))
744+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
743745 def test_cannot_acknowledge_less_than_zero (self , frame_factory , size ):
744746 """
745747 The user must acknowledge at least 0 bytes.
@@ -837,6 +839,7 @@ def test_acknowledging_streams_we_never_saw(self, frame_factory):
837839 c .acknowledge_received_data (2048 , stream_id = 101 )
838840
839841 @given (integers (min_value = 1025 , max_value = DEFAULT_FLOW_WINDOW ))
842+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
840843 def test_acknowledging_1024_bytes_when_empty_increments (self ,
841844 frame_factory ,
842845 increment ):
@@ -873,6 +876,7 @@ def test_acknowledging_1024_bytes_when_empty_increments(self,
873876 # This test needs to use a lower cap, because otherwise the algo will
874877 # increment the stream window anyway.
875878 @given (integers (min_value = 1025 , max_value = (DEFAULT_FLOW_WINDOW // 4 ) - 1 ))
879+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
876880 def test_connection_only_empty (self , frame_factory , increment ):
877881 """
878882 If the connection flow control window is empty, but the stream flow
@@ -916,6 +920,7 @@ def test_connection_only_empty(self, frame_factory, increment):
916920 assert c .data_to_send () == expected_data
917921
918922 @given (integers (min_value = 1025 , max_value = DEFAULT_FLOW_WINDOW ))
923+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
919924 def test_mixing_update_forms (self , frame_factory , increment ):
920925 """
921926 If the user mixes ackowledging data with manually incrementing windows,
0 commit comments