File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5136,7 +5136,10 @@ def testLargeTimeout(self):
5136
5136
# gh-126876: Check that a timeout larger than INT_MAX is replaced with
5137
5137
# INT_MAX in the poll() code path. The following assertion must not
5138
5138
# fail: assert(INT_MIN <= ms && ms <= INT_MAX).
5139
- large_timeout = _testcapi .INT_MAX + 1
5139
+ if _testcapi is not None :
5140
+ large_timeout = _testcapi .INT_MAX + 1
5141
+ else :
5142
+ large_timeout = 2147483648
5140
5143
5141
5144
# test recv() with large timeout
5142
5145
conn , addr = self .serv .accept ()
@@ -5151,7 +5154,10 @@ def testLargeTimeout(self):
5151
5154
5152
5155
def _testLargeTimeout (self ):
5153
5156
# test sendall() with large timeout
5154
- large_timeout = _testcapi .INT_MAX + 1
5157
+ if _testcapi is not None :
5158
+ large_timeout = _testcapi .INT_MAX + 1
5159
+ else :
5160
+ large_timeout = 2147483648
5155
5161
self .cli .connect ((HOST , self .port ))
5156
5162
try :
5157
5163
self .cli .settimeout (large_timeout )
You can’t perform that action at this time.
0 commit comments