mapnik/tests/python_tests/grayscale_test.py

14 lines
374 B
Python
Raw Normal View History

import mapnik
from nose.tools import *
2013-07-13 01:45:51 +02:00
from utilities import execution_path, run_all
def test_grayscale_conversion():
im = mapnik.Image(2,2)
im.background = mapnik.Color('white')
im.set_grayscale_to_alpha()
pixel = im.get_pixel(0,0)
eq_((pixel >> 24) & 0xff,255);
if __name__ == "__main__":
2013-07-13 01:45:51 +02:00
run_all(eval(x) for x in dir() if x.startswith("test_"))