Did I find the right examples for you? yes no

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/m/e/memcache_client-HEAD/test.py   memcache_client(Download)
 
            self.assertRaises(Exception, client.get, key)
            client.close()
        finally:
            if mock_memcached:
            mcval = client.get(key)
            self.assertEqual(mcval, None) # val lost when restarted
            client.close()
        finally:
            mock_memcached.terminate()
            mcval = client.get(key)
            self.assertEqual(val, mcval)
            client.close()
        finally:
            mock_memcached.terminate()
            # the following will fail w/ socket.error, EAGAIN
            self.assertRaises(socket.timeout, client.get, key)
            client.close()
        finally:
            mock_memcached.terminate()
        client = memcache.Client(self.unavailable_ip, 11211, timeout=1)
        self.assertRaises(socket.timeout, client._connect)
        client.close()
 
    def test_connect_timeout2(self):