Skip to content

Commit

Permalink
Trying to fix file read on travis filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermef committed Oct 29, 2015
1 parent d7f7a93 commit 6cf0629
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions tests/fixtures/images/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com


import sys
from os.path import abspath, join, dirname


Expand All @@ -18,14 +18,17 @@
# - too small image : JPEG 20x20, 822 B
# - too weight image : JPEG 300x400, 85.32 KB
##
valid_image_path = abspath(join(dirname(__file__), u'alabama1_ap620é.jpg'))
too_small_image_path = abspath(join(dirname(__file__), 'crocodile.jpg'))
too_heavy_image_path = abspath(join(dirname(__file__), 'conselheira_tutelar.jpg'))
default_image_path = abspath(join(dirname(__file__), 'image.jpg'))
alabama1_image_path = abspath(join(dirname(__file__), 'alabama1_ap620%C3%A9.jpg'))
space_image_path = abspath(join(dirname(__file__), 'image space.jpg'))
invalid_quantization_image_path = abspath(join(dirname(__file__), 'invalid_quantization.jpg'))
animated_image_path = abspath(join(dirname(__file__), 'animated_image.gif'))
def get_abs_path(img):
return abspath(join(dirname(__file__), img.encode(sys.getfilesystemencoding())))

valid_image_path = get_abs_path(u'alabama1_ap620é.jpg')
too_small_image_path = get_abs_path('crocodile.jpg')
too_heavy_image_path = get_abs_path('conselheira_tutelar.jpg')
default_image_path = get_abs_path('image.jpg')
alabama1_image_path = get_abs_path('alabama1_ap620%C3%A9.jpg')
space_image_path = get_abs_path('image space.jpg')
invalid_quantization_image_path = get_abs_path('invalid_quantization.jpg')
animated_image_path = get_abs_path('animated_image.gif')


def get_image(img):
Expand Down

0 comments on commit 6cf0629

Please sign in to comment.