def populate():
	"""
	Populates the LDT list test data.
	"""
	for expo in xrange(2, 4):
		base_value = lib.identifier(pow(10, expo))

		for expo2 in xrange(2, 6):
			ldt = []

			for index in xrange(pow(10, expo2)):
				ldt.append(base_value + "-" + str(index))

			LARGE_LIST_VALUES.append(ldt)
Esempio n. 2
0
def populate():
    """
	Populates the LDT list test data.
	"""
    for expo in xrange(2, 4):
        base_value = lib.identifier(pow(10, expo))

        for expo2 in xrange(2, 6):
            ldt = []

            for index in xrange(pow(10, expo2)):
                ldt.append(base_value + "-" + str(index))

            LARGE_LIST_VALUES.append(ldt)
	100000000000000000000.0,
	-0.00000000000000000001,
	-100000000000000000000.0,
	float("nan"), float("+inf"), float("-inf"),
	2.2250738585072014e-308,
	1.7976931348623157e+308
]

GEO_VALUES = [
	aerospike.GeoJSON({
		"type": "Point",
		"coordinates": [0.0, 0.0]
	})
]

MAP_KEYS = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]
MAP_VALUES = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]

LIST_VALUES = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]

LARGE_LIST_MAPS = {
	15: {},
	16: {},
	255: {},
	256: {},
	65535: {},
	65536: {},
	131072: {}
}

LARGE_LIST_VALUES = []
Esempio n. 4
0
	100000000000000000000.0,
	-0.00000000000000000001,
	-100000000000000000000.0,
	float("nan"), float("+inf"), float("-inf"),
	2.2250738585072014e-308,
	1.7976931348623157e+308
]

GEO_VALUES = [
	aerospike.GeoJSON({
		"type": "Point",
		"coordinates": [0.0, 0.0]
	})
]

MAP_KEYS = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]
MAP_VALUES = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]

LIST_VALUES = [[lib.identifier(10) for _ in xrange(100)] for _ in xrange(50)]

def put_values(set_name, key, values):
	"""
	Inserts the given key with bins "bin-0" ... "bin-<n>" with the n given values.
	"""
	bin_names = [u"bin-" + str(index) for index in xrange(len(values))]
	lib.write_record(set_name, key, bin_names, values)

def check_values(set_name, key, values):
	"""
	Ensures that the given key has bins "bin-0" ... "bin-<n>" with the n given values.
	"""