File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,26 @@ def testClear(self):
361
361
al .clear ()
362
362
self .assertEqual (al .featureCount (), 0 )
363
363
364
+ def testSetAuxiliaryLayer (self ):
365
+ s = QgsAuxiliaryStorage ()
366
+ self .assertTrue (s .isValid ())
367
+
368
+ # Create a new auxiliary layer with 'pk' as key
369
+ vl = createLayer ()
370
+ pkf = vl .fields ().field (vl .fields ().indexOf ('pk' ))
371
+ al = s .createAuxiliaryLayer (pkf , vl )
372
+ self .assertTrue (al .isValid ())
373
+ vl .setAuxiliaryLayer (al )
374
+
375
+ self .assetFalse (vl .auxiliaryLayer (), None )
376
+
377
+ # Clear auxiliary layer
378
+ al .clear ()
379
+ # Remove auxiliary layer
380
+ vl .setAuxiliaryLayer ()
381
+
382
+ self .assetTrue (vl .auxiliaryLayer (), None )
383
+
364
384
def testCreateProperty (self ):
365
385
s = QgsAuxiliaryStorage ()
366
386
self .assertTrue (s .isValid ())
You can’t perform that action at this time.
0 commit comments