7
7
"""
8
8
import pytest
9
9
10
- from hypothesis import given
10
+ from hypothesis import given , settings , HealthCheck
11
11
from hypothesis .strategies import integers
12
12
13
13
import h2 .config
@@ -715,6 +715,7 @@ def _setup_connection_and_send_headers(self, frame_factory):
715
715
return c
716
716
717
717
@given (stream_id = integers (max_value = 0 ))
718
+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
718
719
def test_must_acknowledge_for_stream (self , frame_factory , stream_id ):
719
720
"""
720
721
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):
740
741
)
741
742
742
743
@given (size = integers (max_value = - 1 ))
744
+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
743
745
def test_cannot_acknowledge_less_than_zero (self , frame_factory , size ):
744
746
"""
745
747
The user must acknowledge at least 0 bytes.
@@ -837,6 +839,7 @@ def test_acknowledging_streams_we_never_saw(self, frame_factory):
837
839
c .acknowledge_received_data (2048 , stream_id = 101 )
838
840
839
841
@given (integers (min_value = 1025 , max_value = DEFAULT_FLOW_WINDOW ))
842
+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
840
843
def test_acknowledging_1024_bytes_when_empty_increments (self ,
841
844
frame_factory ,
842
845
increment ):
@@ -873,6 +876,7 @@ def test_acknowledging_1024_bytes_when_empty_increments(self,
873
876
# This test needs to use a lower cap, because otherwise the algo will
874
877
# increment the stream window anyway.
875
878
@given (integers (min_value = 1025 , max_value = (DEFAULT_FLOW_WINDOW // 4 ) - 1 ))
879
+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
876
880
def test_connection_only_empty (self , frame_factory , increment ):
877
881
"""
878
882
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):
916
920
assert c .data_to_send () == expected_data
917
921
918
922
@given (integers (min_value = 1025 , max_value = DEFAULT_FLOW_WINDOW ))
923
+ @settings (suppress_health_check = [HealthCheck .function_scoped_fixture ])
919
924
def test_mixing_update_forms (self , frame_factory , increment ):
920
925
"""
921
926
If the user mixes ackowledging data with manually incrementing windows,
0 commit comments