2012-09-01 04:12:12 +02:00
|
|
|
import mapnik
|
|
|
|
from nose.tools import *
|
2013-06-03 04:28:24 +02:00
|
|
|
from utilities import execution_path, run_all
|
2012-09-01 04:12:12 +02:00
|
|
|
|
|
|
|
def test_grayscale_conversion():
|
|
|
|
im = mapnik.Image(2,2)
|
2015-01-29 21:27:42 +01:00
|
|
|
im.fill(mapnik.Color('white'))
|
2012-09-01 04:12:12 +02:00
|
|
|
im.set_grayscale_to_alpha()
|
|
|
|
pixel = im.get_pixel(0,0)
|
|
|
|
eq_((pixel >> 24) & 0xff,255);
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2014-07-14 18:34:20 +02:00
|
|
|
exit(run_all(eval(x) for x in dir() if x.startswith("test_")))
|