mirror of https://github.com/saimn/sigal.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
430 B
18 lines
430 B
# -*- coding:utf-8 -*- |
|
|
|
import os |
|
|
|
from sigal.image import generate_image, generate_thumbnail |
|
|
|
CURRENT_DIR = os.path.dirname(__file__) |
|
TEST_IMAGE = 'exo20101028-b-full.jpg' |
|
|
|
|
|
def test_image(tmpdir): |
|
"Test the Image class." |
|
|
|
srcfile = os.path.join(CURRENT_DIR, 'sample', 'dir2', TEST_IMAGE) |
|
dstfile = str(tmpdir.join(TEST_IMAGE)) |
|
|
|
generate_thumbnail(srcfile, dstfile, (200, 150)) |
|
assert os.path.isfile(dstfile)
|
|
|