MCPcopy Create free account
hub / github.com/RustPython/RustPython / testTimeoutDefault

Method testTimeoutDefault

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

Source from the content-addressed store, hash-verified

535 serv.close()
536
537 def testTimeoutDefault(self):
538 self.assertIsNone(socket.getdefaulttimeout())
539 socket.setdefaulttimeout(test_support.LOOPBACK_TIMEOUT)
540 try:
541 pop = poplib.POP3(HOST, self.port)
542 finally:
543 socket.setdefaulttimeout(None)
544 self.assertEqual(pop.sock.gettimeout(), test_support.LOOPBACK_TIMEOUT)
545 pop.close()
546
547 def testTimeoutNone(self):
548 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