def cache_test( token, hostname, slicenumber, resolution ):
  """ Carry's out the test on a given number of tiles """
  totalsize = 0.0

  for X in range(0,20):
    for Y in range(0,20):
      
      try:
        url = 'http://{}/ocpcatmaid/tilecache/{}/{}/{}_{}_{}.png'.format(hostname, token, slicenumber, X, Y, resolution )
        req = urllib2.Request( url )
        response = urllib2.urlopen(req)
        totalsize += sys.getsizeof(response)
      except urllib2.URLError, e:
        print "Failed URL {}".format(url)
        print "Error {}".format(e)

  print "Size in kilobytes {}".format(1024/totalsize)
dataset/ETHPy150Open neurodata/ndstore/util/deprecated/cshlTest.py/cache_test/swapped operands of `/`