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

Function test_include_empty

python/rio-pmtiles/tests/test_cli.py:186–198  ·  view source on GitHub ↗

This file has the same shape as RGB.byte.tif, but no data.

(tmpdir, empty_data)

Source from the content-addressed store, hash-verified

184
185
186def test_include_empty(tmpdir, empty_data):
187 """This file has the same shape as RGB.byte.tif, but no data."""
188 inputfile = empty_data
189 outputfile = str(tmpdir.join("export.pmtiles"))
190 runner = CliRunner()
191 result = runner.invoke(
192 main_group, ["pmtiles", "--include-empty-tiles", inputfile, outputfile]
193 )
194 assert result.exit_code == 0
195
196 with open(outputfile, 'rb') as f:
197 src = MmapSource(f)
198 assert len(list(all_tiles(src))) == 19
199
200
201def test_invalid_format_rgba(tmpdir, empty_data):

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…