2012-08-17 00:52:32 +02:00
|
|
|
#!/usr/bin/env python
|
2015-02-02 19:31:16 +01:00
|
|
|
from nose.tools import eq_
|
|
|
|
from utilities import run_all
|
2012-08-17 00:52:32 +02:00
|
|
|
import mapnik
|
|
|
|
|
|
|
|
def test_logger_init():
|
|
|
|
eq_(mapnik.severity_type.Debug,0)
|
|
|
|
eq_(mapnik.severity_type.Warn,1)
|
|
|
|
eq_(mapnik.severity_type.Error,2)
|
|
|
|
eq_(mapnik.severity_type.None,3)
|
|
|
|
default = mapnik.logger.get_severity()
|
2013-06-03 03:40:06 +02:00
|
|
|
mapnik.logger.set_severity(mapnik.severity_type.Debug)
|
|
|
|
eq_(mapnik.logger.get_severity(),mapnik.severity_type.Debug)
|
2012-08-17 00:52:32 +02:00
|
|
|
mapnik.logger.set_severity(default)
|
2013-06-03 03:40:06 +02:00
|
|
|
eq_(mapnik.logger.get_severity(),default)
|
2012-08-17 00:52:32 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2014-07-14 18:34:20 +02:00
|
|
|
exit(run_all(eval(x) for x in dir() if x.startswith("test_")))
|