Skip to content

Commit

Permalink
Update PyQgsPythonProvider test
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Sep 9, 2020
1 parent 74ffc1a commit 02cff9f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/src/python/provider_python.py
Expand Up @@ -195,12 +195,12 @@ def description(cls):
return 'Python Test Provider'

@classmethod
def createProvider(cls, uri, providerOptions):
return PyProvider(uri, providerOptions)
def createProvider(cls, uri, providerOptions, flags=QgsDataProvider.ReadFlags()):
return PyProvider(uri, providerOptions, flags)

# Implementation of functions from QgsVectorDataProvider

def __init__(self, uri='', providerOptions=QgsDataProvider.ProviderOptions()):
def __init__(self, uri='', providerOptions=QgsDataProvider.ProviderOptions(), flags=QgsDataProvider.ReadFlags()):
super().__init__(uri)
# Use the memory layer to parse the uri
mlayer = QgsVectorLayer(uri, 'ml', 'memory')
Expand All @@ -215,6 +215,7 @@ def __init__(self, uri='', providerOptions=QgsDataProvider.ProviderOptions()):
self._crs = mlayer.crs()
self._spatialindex = None
self._provider_options = providerOptions
self._flags = flags
if 'index=yes' in self._uri:
self.createSpatialIndex()

Expand Down

0 comments on commit 02cff9f

Please sign in to comment.