File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 245245 True
246246 >>>
247247
248- Testcase 1: Multicast should have a default and valid buffer size.
248+ Testcase 1: Multicast should validate buffer size constraints .
249249 A: Test that the _MCAST_DEFAULT_BUFFER_SIZE attribute is initialized.
250250 B: Test that the _MCAST_DEFAULT_BUFFER_SIZE attribute is an int.
251251 C: Test that the _MCAST_DEFAULT_BUFFER_SIZE attribute is RFC-791 & RFC-768 compliant.
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def validate_buffer_size(size: int) -> bool:
120120 False
121121 >>> validate_buffer_size(-1) # Negative is invalid
122122 False
123- >>> validate_buffer_size(65527 ) # Maximum UDP payload size 65,535-8 - RFC 791 & RFC 768
123+ >>> validate_buffer_size(65507 ) # Maximum UDP payload size 65,535 -8 -20 ( RFC- 791 & RFC- 768)
124124 True
125125 >>> validate_buffer_size("1316") # String that can be converted
126126 True
@@ -133,7 +133,7 @@ def validate_buffer_size(size: int) -> bool:
133133 """
134134 try :
135135 size_num = int (size )
136- return 0 < size_num <= 65527
136+ return 0 < size_num <= 65507
137137 except (ValueError , TypeError ) as err :
138138 raise ValueError (f"Invalid buffer size value: { size } . Must be a positive integer." ) from err
139139
@@ -828,7 +828,7 @@ def load_config() -> dict:
828828 >>> with warnings.catch_warnings(record=True) as w:
829829 ... warnings.simplefilter("always")
830830 ... config = load_config()
831- ... len(w) == 1 # expected failure - Warning was issued
831+ ... len(w) == 1 # expected warning was issued
832832 True
833833 >>> config['buffer_size'] == _MCAST_DEFAULT_BUFFER_SIZE # Falls back to default
834834 True
You can’t perform that action at this time.
0 commit comments