def test_connection_error(self): fs = FTPFS('ftp.not.a.chance', timeout=1) with self.assertRaises(errors.RemoteConnectionError): fs.listdir('/') with self.assertRaises(errors.RemoteConnectionError): fs.makedir('foo') with self.assertRaises(errors.RemoteConnectionError): fs.open('foo.txt')
def test_connection_error(self): fs = FTPFS("ftp.not.a.chance", timeout=1) with self.assertRaises(errors.RemoteConnectionError): fs.listdir("/") with self.assertRaises(errors.RemoteConnectionError): fs.makedir("foo") with self.assertRaises(errors.RemoteConnectionError): fs.open("foo.txt")