MCPcopy Index your code
hub / github.com/python/cpython / testSetBlocking_overflow

Method testSetBlocking_overflow

Lib/test/test_socket.py:5443–5453  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5441 @support.cpython_only
5442 @unittest.skipIf(_testcapi is None, "requires _testcapi")
5443 def testSetBlocking_overflow(self):
5444 # Issue 15989
5445 import _testcapi
5446 if _testcapi.UINT_MAX >= _testcapi.ULONG_MAX:
5447 self.skipTest('needs UINT_MAX < ULONG_MAX')
5448
5449 self.serv.setblocking(False)
5450 self.assertEqual(self.serv.gettimeout(), 0.0)
5451
5452 self.serv.setblocking(_testcapi.UINT_MAX + 1)
5453 self.assertIsNone(self.serv.gettimeout())
5454
5455 _testSetBlocking_overflow = support.cpython_only(_testSetBlocking)
5456

Callers

nothing calls this directly

Calls 5

skipTestMethod · 0.80
assertIsNoneMethod · 0.80
setblockingMethod · 0.45
assertEqualMethod · 0.45
gettimeoutMethod · 0.45

Tested by

no test coverage detected