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

Method testTimeoutDefault

Lib/test/test_poplib.py:545–553  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

543 serv.close()
544
545 def testTimeoutDefault(self):
546 self.assertIsNone(socket.getdefaulttimeout())
547 socket.setdefaulttimeout(test_support.LOOPBACK_TIMEOUT)
548 try:
549 pop = poplib.POP3(HOST, self.port)
550 finally:
551 socket.setdefaulttimeout(None)
552 self.assertEqual(pop.sock.gettimeout(), test_support.LOOPBACK_TIMEOUT)
553 pop.close()
554
555 def testTimeoutNone(self):
556 self.assertIsNone(socket.getdefaulttimeout())

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
assertIsNoneMethod · 0.80
assertEqualMethod · 0.45
gettimeoutMethod · 0.45

Tested by

no test coverage detected