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

Method testTimeoutValue

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

Source from the content-addressed store, hash-verified

1112 ftp.close()
1113
1114 def testTimeoutValue(self):
1115 # a value
1116 ftp = ftplib.FTP(HOST, timeout=30)
1117 self.assertEqual(ftp.sock.gettimeout(), 30)
1118 self.evt.wait()
1119 ftp.close()
1120
1121 # bpo-39259
1122 with self.assertRaises(ValueError):
1123 ftplib.FTP(HOST, timeout=0)
1124
1125 def testTimeoutConnect(self):
1126 ftp = ftplib.FTP()

Callers

nothing calls this directly

Calls 5

closeMethod · 0.95
assertEqualMethod · 0.45
gettimeoutMethod · 0.45
waitMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected