File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5136,7 +5136,10 @@ def testLargeTimeout(self):
51365136 # gh-126876: Check that a timeout larger than INT_MAX is replaced with
51375137 # INT_MAX in the poll() code path. The following assertion must not
51385138 # 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
51405143
51415144 # test recv() with large timeout
51425145 conn , addr = self .serv .accept ()
@@ -5151,7 +5154,10 @@ def testLargeTimeout(self):
51515154
51525155 def _testLargeTimeout (self ):
51535156 # 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
51555161 self .cli .connect ((HOST , self .port ))
51565162 try :
51575163 self .cli .settimeout (large_timeout )
You can’t perform that action at this time.
0 commit comments