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

Function test_skip_empty

python/rio-pmtiles/tests/test_cli.py:173–183  ·  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

171
172
173def test_skip_empty(tmpdir, empty_data):
174 """This file has the same shape as RGB.byte.tif, but no data."""
175 inputfile = empty_data
176 outputfile = str(tmpdir.join("export.pmtiles"))
177 runner = CliRunner()
178 result = runner.invoke(main_group, ["pmtiles", inputfile, outputfile])
179 assert result.exit_code == 0
180
181 with open(outputfile, 'rb') as f:
182 src = MmapSource(f)
183 assert len(list(all_tiles(src))) == 0
184
185
186def test_include_empty(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…