Files
sigal/tests/test_image.py

20 lines
475 B
Python
Raw Normal View History

2012-11-27 23:31:12 +01:00
# -*- coding:utf-8 -*-
import os
from sigal.image import generate_image, generate_thumbnail
2012-11-27 23:31:12 +01:00
CURRENT_DIR = os.path.dirname(__file__)
2012-11-27 23:47:16 +01:00
TEST_IMAGE = 'exo20101028-b-full.jpg'
def test_image(tmpdir):
2012-11-27 23:47:16 +01:00
"Test the Image class."
srcfile = os.path.join(CURRENT_DIR, 'sample', 'pictures', 'dir2',
TEST_IMAGE)
dstfile = str(tmpdir.join(TEST_IMAGE))
2012-11-27 23:47:16 +01:00
2013-04-21 01:03:30 +02:00
generate_thumbnail(srcfile, dstfile, (200, 150), None)
assert os.path.isfile(dstfile)