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

Method testTimeoutNone

Lib/test/test_ftplib.py:1102–1112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1100 ftp.close()
1101
1102 def testTimeoutNone(self):
1103 # no timeout -- do not use global socket timeout
1104 self.assertIsNone(socket.getdefaulttimeout())
1105 socket.setdefaulttimeout(30)
1106 try:
1107 ftp = ftplib.FTP(HOST, timeout=None)
1108 finally:
1109 socket.setdefaulttimeout(None)
1110 self.assertIsNone(ftp.sock.gettimeout())
1111 self.evt.wait()
1112 ftp.close()
1113
1114 def testTimeoutValue(self):
1115 # a value

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
assertIsNoneMethod · 0.80
gettimeoutMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected