Skip to content

Commit

Permalink
add tests for zyx scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewharvey committed Sep 28, 2017
1 parent e40eca0 commit daf299a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Binary file added test/data/tiles/zyx/3/2/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions test/data/tiles/zyx/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "ZYX Tiles",
"type": "baselayer",
"description": "",
"version": "1",
"format": "png"
}
9 changes: 8 additions & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,11 @@ def test_mbtiles_to_disk_utfgrid_callback():
callback[c] = f.read().split('{')[0]
f.close()
assert callback['foo'] == 'foo('
assert callback['null'] == ''
assert callback['null'] == ''

@with_setup(clear_data, clear_data)
def test_disk_to_mbtiles_zyx():
os.mkdir('test/output')
disk_to_mbtiles('test/data/tiles/zyx', 'test/output/zyx.mbtiles', scheme='zyx', format='png')
mbtiles_to_disk('test/output/zyx.mbtiles', 'test/output/tiles', callback=None)
assert os.path.exists('test/output/tiles/3/1/5.png')

0 comments on commit daf299a

Please sign in to comment.