Beispiel #1
0
 def test_float_fractional_tile_size(self):
     with pytest.raises(config.ConfigError):
         dataset = config.TiledDataset(
             name="test",
             path=SRTM_FOLDER,
             tile_paths=[],
             filename_epsg=None,
             filename_tile_size=0.25,
         )
Beispiel #2
0
 def test_string_tile_size(self):
     tile_size = "2.5"
     dataset = config.TiledDataset(
         name="test",
         path=SRTM_FOLDER,
         tile_paths=[],
         filename_epsg=None,
         filename_tile_size=tile_size,
     )
     assert dataset.filename_tile_size == Decimal(tile_size)
Beispiel #3
0
 def test_float_whole_tile_size(self):
     tile_size = 2.0
     dataset = config.TiledDataset(
         name="test",
         path=SRTM_FOLDER,
         tile_paths=[],
         filename_epsg=None,
         filename_tile_size=tile_size,
     )
     assert dataset.filename_tile_size == int(tile_size)
     assert isinstance(dataset.filename_tile_size, Decimal)