File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import os
33import pytest
44
5+ from .utilities import execution_path
6+
7+ @pytest .fixture (scope = "module" )
8+ def setup ():
9+ # All of the paths used are relative, if we run the tests
10+ # from another directory we need to chdir()
11+ os .chdir (execution_path ('.' ))
12+ yield
13+
514if mapnik .has_webp ():
615 tmp_dir = '/tmp/mapnik-webp/'
716 if not os .path .exists (tmp_dir ):
3140 ]
3241
3342 def gen_filepath (name , format ):
34- return os .path .join ('./test/python_tests/ images/support/encoding-opts' ,
43+ return os .path .join ('images/support/encoding-opts' ,
3544 name + '-' + format .replace (":" , "+" ) + '.webp' )
3645
37- def test_quality_threshold ():
46+ def test_quality_threshold (setup ):
3847 im = mapnik .Image (256 , 256 )
3948 im .tostring ('webp:quality=99.99000' )
4049 im .tostring ('webp:quality=0' )
You can’t perform that action at this time.
0 commit comments