def _getOgrTestLayer(self): dest = self._copyTestLayer() driver = ogr.GetDriverByName('GPKG') dataSource = driver.Open(dest, 1) return dataSource