File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -841,8 +841,11 @@ def testCreateSpatialIndex(self):
841
841
def testSubSetStringEditable_bug17795 (self ):
842
842
"""Test that a layer is not editable after setting a subset and it's reverted to editable after the filter is removed"""
843
843
844
+ tmpfile = os .path .join (self .basetestpath , 'testSubSetStringEditable_bug17795.gpkg' )
845
+ shutil .copy (TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg' , tmpfile )
846
+
844
847
isEditable = QgsVectorDataProvider .ChangeAttributeValues
845
- testPath = TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg |layername=bug_17795'
848
+ testPath = tmpfile + '|layername=bug_17795'
846
849
847
850
vl = QgsVectorLayer (testPath , 'subset_test' , 'ogr' )
848
851
self .assertTrue (vl .isValid ())
@@ -868,7 +871,10 @@ def testSubsetStringExtent_bug17863(self):
868
871
def _lessdigits (s ):
869
872
return re .sub (r'(\d+\.\d{3})\d+' , r'\1' , s )
870
873
871
- testPath = TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg|layername=bug_17795'
874
+ tmpfile = os .path .join (self .basetestpath , 'testSubsetStringExtent_bug17863.gpkg' )
875
+ shutil .copy (TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg' , tmpfile )
876
+
877
+ testPath = tmpfile + '|layername=bug_17795'
872
878
subSetString = '"name" = \' int\' '
873
879
subSet = '|layername=bug_17795|subset=%s' % subSetString
874
880
You can’t perform that action at this time.
0 commit comments