MCPcopy
hub / github.com/protomaps/PMTiles / test_export_count

Function test_export_count

python/rio-pmtiles/tests/test_cli.py:233–250  ·  view source on GitHub ↗
(tmpdir, data, minzoom, maxzoom, exp_num_tiles, source)

Source from the content-addressed store, hash-verified

231 ],
232)
233def test_export_count(tmpdir, data, minzoom, maxzoom, exp_num_tiles, source):
234 inputfile = str(data.join(source))
235 outputfile = str(tmpdir.join("export.pmtiles"))
236 runner = CliRunner()
237 result = runner.invoke(
238 main_group,
239 [
240 "pmtiles",
241 "--zoom-levels",
242 "{}..{}".format(minzoom, maxzoom),
243 inputfile,
244 outputfile,
245 ],
246 )
247 assert result.exit_code == 0
248 with open(outputfile, 'rb') as f:
249 src = MmapSource(f)
250 assert len(list(all_tiles(src))) == exp_num_tiles
251
252
253@pytest.mark.parametrize("filename", ["RGBA.byte.tif"])

Callers

nothing calls this directly

Calls 2

MmapSourceFunction · 0.90
all_tilesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…