Skip to content
Permalink
Browse files

test_provider_ogr_gpkg.py: avoid bug_17795.gpkg test sample to be mod…

…ified by tests
  • Loading branch information
rouault committed May 31, 2018
1 parent ee06d52 commit 2969ba1e9952399a9b35c049ce748b70043dc5cb
Showing with 8 additions and 2 deletions.
  1. +8 −2 tests/src/python/test_provider_ogr_gpkg.py
@@ -841,8 +841,11 @@ def testCreateSpatialIndex(self):
def testSubSetStringEditable_bug17795(self):
"""Test that a layer is not editable after setting a subset and it's reverted to editable after the filter is removed"""

tmpfile = os.path.join(self.basetestpath, 'testSubSetStringEditable_bug17795.gpkg')
shutil.copy(TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg', tmpfile)

isEditable = QgsVectorDataProvider.ChangeAttributeValues
testPath = TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg|layername=bug_17795'
testPath = tmpfile + '|layername=bug_17795'

vl = QgsVectorLayer(testPath, 'subset_test', 'ogr')
self.assertTrue(vl.isValid())
@@ -868,7 +871,10 @@ def testSubsetStringExtent_bug17863(self):
def _lessdigits(s):
return re.sub(r'(\d+\.\d{3})\d+', r'\1', s)

testPath = TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg|layername=bug_17795'
tmpfile = os.path.join(self.basetestpath, 'testSubsetStringExtent_bug17863.gpkg')
shutil.copy(TEST_DATA_DIR + '/' + 'provider/bug_17795.gpkg', tmpfile)

testPath = tmpfile + '|layername=bug_17795'
subSetString = '"name" = \'int\''
subSet = '|layername=bug_17795|subset=%s' % subSetString

0 comments on commit 2969ba1

Please sign in to comment.
You can’t perform that action at this time.