File: layer_test.py

package info (click to toggle)
python-mapnik 1%3A0.0~20240222-5ab32f020-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,364 kB
  • sloc: python: 11,685; cpp: 5,776; sh: 242; makefile: 10
file content (21 lines) | stat: -rw-r--r-- 589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import mapnik

# Map initialization

def test_layer_init():
    l = mapnik.Layer('test')
    assert l.name ==  'test'
    assert l.srs ==  'epsg:4326'
    assert l.envelope() ==  mapnik.Box2d()
    assert not l.clear_label_cache
    assert not l.cache_features
    assert l.visible(1)
    assert l.active
    assert l.datasource ==  None
    assert not l.queryable
    assert l.minimum_scale_denominator ==  0.0
    assert l.maximum_scale_denominator > 1e+6
    assert l.group_by ==  ""
    assert l.maximum_extent ==  None
    assert l.buffer_size ==  None
    assert len(l.styles) ==  0