def test_namespaces(lrucache, slabutil):
    values = range(_SLABSZ)
    slabdesc1 = slabutil_make_slab(_NS, zip(map(str, values), values))
    lrucache.insert_slab(slabdesc1)

    slabdesc2 = slabutil_make_slab(_NS1, zip(map(str, values),
                                             map(lambda x: x*x, values)))
    lrucache.insert_slab(slabdesc2)

    for i in xrange(_SLABSZ):
        st, v1 = lrucache.get(_NS, str(i))
        assert st
        assert v1 == i
        st, v2 = lrucache.get(_NS1, str(i))
        assert st
        assert v2 == i*i
Test that different namespaces are distinct.
dataset/ETHPy150Open MapQuest/mapquest-osm-server/src/python/tests/test_lrucache.py/test_namespaces