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 @@ -5130,7 +5130,10 @@ def testLargeTimeout(self):
5130
5130
# gh-126876: Check that a timeout larger than INT_MAX is replaced with
5131
5131
# INT_MAX in the poll() code path. The following assertion must not
5132
5132
# fail: assert(INT_MIN <= ms && ms <= INT_MAX).
5133
- large_timeout = _testcapi .INT_MAX + 1
5133
+ if _testcapi is not None :
5134
+ large_timeout = _testcapi .INT_MAX + 1
5135
+ else :
5136
+ large_timeout = 2147483648
5134
5137
5135
5138
# test recv() with large timeout
5136
5139
conn , addr = self .serv .accept ()
@@ -5145,7 +5148,10 @@ def testLargeTimeout(self):
5145
5148
5146
5149
def _testLargeTimeout (self ):
5147
5150
# test sendall() with large timeout
5148
- large_timeout = _testcapi .INT_MAX + 1
5151
+ if _testcapi is not None :
5152
+ large_timeout = _testcapi .INT_MAX + 1
5153
+ else :
5154
+ large_timeout = 2147483648
5149
5155
self .cli .connect ((HOST , self .port ))
5150
5156
try :
5151
5157
self .cli .settimeout (large_timeout )
You can’t perform that action at this time.
0 commit comments