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

Method testTimeoutNone

Lib/test/test_smtplib.py:119–128  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

117 client.close()
118
119 def testTimeoutNone(self):
120 mock_socket.reply_with(b"220 Hola mundo")
121 self.assertIsNone(socket.getdefaulttimeout())
122 socket.setdefaulttimeout(30)
123 try:
124 client = self.client(HOST, self.port, timeout=None)
125 finally:
126 socket.setdefaulttimeout(None)
127 self.assertIsNone(client.sock.gettimeout())
128 client.close()
129
130 def testTimeoutZero(self):
131 mock_socket.reply_with(b"220 Hola mundo")

Callers

nothing calls this directly

Calls 4

assertIsNoneMethod · 0.80
clientMethod · 0.45
gettimeoutMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected