Exemple #1
0
def test_parameters_pickle():
    params = mapnik.Parameters()
    params.append(mapnik.Parameter('oh', str('yeah')))

    params2 = pickle.loads(pickle.dumps(params, pickle.HIGHEST_PROTOCOL))

    eq_(params[0][0], params2[0][0])
    eq_(params[0][1], params2[0][1])
Exemple #2
0
def test_parameters():
    params = mapnik.Parameters()
    p = mapnik.Parameter('float', 1.0777)
    eq_(p[0], 'float')
    eq_(p[1], 1.0777)

    params.append(p)

    eq_(params[0][0], 'float')
    eq_(params[0][1], 1.0777)

    eq_(params.get('float'), 1.0777)