File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,19 @@ def testDataItems(self):
475
475
self .assertIn ('testDataItems.gpkg|layername=Layer1' , children [0 ].uri ())
476
476
self .assertIn ('testDataItems.gpkg|layername=Layer2' , children [1 ].uri ())
477
477
478
+ def testDataItemsRaster (self ):
479
+
480
+ registry = QgsApplication .dataItemProviderRegistry ()
481
+ ogrprovider = next (provider for provider in registry .providers () if provider .name () == 'OGR' )
482
+
483
+ # Multiple layer (geopackage)
484
+ path = os .path .join (unitTestDataPath (), 'two_raster_layers.gpkg' )
485
+ item = ogrprovider .createDataItem (path , None )
486
+ children = item .createChildren ()
487
+ self .assertEqual (len (children ), 2 )
488
+ self .assertIn ('GPKG:' + path + ':layer01' , children [0 ].uri ())
489
+ self .assertIn ('GPKG:' + path + ':layer02' , children [1 ].uri ())
490
+
478
491
def testOSM (self ):
479
492
""" Test that opening several layers of the same OSM datasource works properly """
480
493
You can’t perform that action at this time.
0 commit comments